All Projects → sheerun → targets-webpack-plugin

sheerun / targets-webpack-plugin

Licence: MIT license
Webpack plugin for transcompilig final bundles so they support legacy browsers

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to targets-webpack-plugin

Webpack Messages
Beautifully format Webpack messages throughout your bundle lifecycle(s)!
Stars: ✭ 238 (+1486.67%)
Mutual labels:  webpack-plugin
asset-map-webpack-plugin
Webpack plugin that creates a map of assets to public url slug for server agnostic usage.
Stars: ✭ 14 (-6.67%)
Mutual labels:  webpack-plugin
qn-webpack
Qiniu webpack plugin (七牛 Webpack 插件)
Stars: ✭ 39 (+160%)
Mutual labels:  webpack-plugin
nunjucks-webpack-plugin
A webpack plugin for nunjucks.
Stars: ✭ 27 (+80%)
Mutual labels:  webpack-plugin
webpack-omit-js-for-css-plugin
This plugin will omit bundled JS files for dependencies that are exclusively CSS, which become obsolete once mini-css-extract-plugin extracts inlined CSS into its own .css file
Stars: ✭ 14 (-6.67%)
Mutual labels:  webpack-plugin
image-minimizer-webpack-plugin
Webpack loader and plugin to compress images using imagemin
Stars: ✭ 180 (+1100%)
Mutual labels:  webpack-plugin
Critters
🦔 A Webpack plugin to inline your critical CSS and lazy-load the rest.
Stars: ✭ 2,894 (+19193.33%)
Mutual labels:  webpack-plugin
warnings-to-errors-webpack-plugin
a webpack plugin that can recognize every warning as errors.
Stars: ✭ 17 (+13.33%)
Mutual labels:  webpack-plugin
eruda-webpack-plugin
A webpack plugin of eruda to help you develop mobile app
Stars: ✭ 56 (+273.33%)
Mutual labels:  webpack-plugin
webpack-demos
webpack小练习
Stars: ✭ 17 (+13.33%)
Mutual labels:  webpack-plugin
webpack-bugsnag-plugins
Webpack plugins for common Bugsnag actions.
Stars: ✭ 29 (+93.33%)
Mutual labels:  webpack-plugin
sitemap-webpack-plugin
Webpack plugin to generate a sitemap.
Stars: ✭ 72 (+380%)
Mutual labels:  webpack-plugin
del-webpack-plugin
A file plugin help you remove old files after webpack (v5) bundling
Stars: ✭ 43 (+186.67%)
Mutual labels:  webpack-plugin
Webpack Shell Plugin
Run shell commands either before or after webpack builds
Stars: ✭ 250 (+1566.67%)
Mutual labels:  webpack-plugin
mock-webpack-plugin
A webpack plugin that starts a json mock server
Stars: ✭ 21 (+40%)
Mutual labels:  webpack-plugin
Copy Webpack Plugin
Copy files and directories with webpack
Stars: ✭ 2,679 (+17760%)
Mutual labels:  webpack-plugin
pxtorem-webpack-plugin
A webpack plugin for generating rem for stylesheet and inject auto calculate scripts.
Stars: ✭ 24 (+60%)
Mutual labels:  webpack-plugin
bower-resolve-webpack-plugin
Offers an enhanced bower support for enhanced-resolve plugin.
Stars: ✭ 12 (-20%)
Mutual labels:  webpack-plugin
config-webpack-plugin
💫 Merge one or more configuration files together with environment variables too.
Stars: ✭ 18 (+20%)
Mutual labels:  webpack-plugin
crx-webpack-plugin
A webpack plugin to package chrome extensions (crx) post build
Stars: ✭ 21 (+40%)
Mutual labels:  webpack-plugin

targets-webpack-plugin npm

A babel plugin for transcompiling final bundles so they support legacy browsers.

This plugin runs babel and rollup only once per asset, at the end of the compilation process.

Installation

npm install --save-dev targets-webpack-plugin

or

yarn add --dev targets-webpack-plugin

Usage

Add TargetsPlugin to the list of plugins.

// next.config.js
const TargetsPlugin = require("targets-webpack-plugin");

module.exports = {
  webpack: function (config, { dev }) {
    if (!dev) {
      config.plugins.push(new TargetsPlugin({
        browsers: ["last 2 versions", "chrome >= 41"]
      }))
    }
    return config
  }
}

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].