{"_id":"babel-minify-webpack-plugin","_rev":"1516775","name":"babel-minify-webpack-plugin","description":"babel-minify plugin for webpack","dist-tags":{"latest":"0.3.1"},"maintainers":[{"name":"bebraw","email":"bebraw@gmail.com"}],"time":{"modified":"2021-11-10T06:23:32.000Z","created":"2016-08-30T07:40:10.576Z","0.3.1":"2018-03-19T19:53:21.700Z","0.3.0":"2018-02-07T13:04:59.348Z","0.2.0":"2017-08-18T21:25:24.154Z","0.0.0":"2016-08-30T07:40:10.576Z"},"users":{"alexreg90":true,"alexreg":true,"dennisli87":true,"zuojiang":true,"flayks":true},"author":{"name":"boopathi","url":"@boopathi"},"repository":{"type":"git","url":"git+https://github.com/webpack-contrib/babel-minify-webpack-plugin.git"},"versions":{"0.3.1":{"name":"babel-minify-webpack-plugin","version":"0.3.1","description":"babel-minify plugin for webpack","author":{"name":"boopathi","url":"@boopathi"},"license":"MIT","engines":{"node":">= 4.3 < 5.0.0 || >= 5.10"},"main":"dist/cjs.js","files":["dist"],"scripts":{"start":"npm run build -- -w","prebuild":"npm run clean","build":"cross-env NODE_ENV=production babel src -d dist --ignore 'src/**/*.test.js'","clean":"del-cli dist","lint":"eslint --cache src test","lint-staged":"lint-staged","prepare":"npm run build","release":"standard-version","security":"nsp check","test":"jest","test:coverage":"jest --collectCoverageFrom='src/**/*.js' --coverage","test:watch":"jest --watch","ci:test":"npm run test","travis:coverage":"npm run test:coverage -- --runInBand","travis:lint":"npm run lint && npm run security","travis:test":"npm run test -- --runInBand","defaults":"webpack-defaults"},"dependencies":{"babel-core":"^6.26.0","babel-preset-minify":"^0.3.0","webpack-sources":"^1.0.1"},"devDependencies":{"babel-cli":"^6.24.1","babel-jest":"^20.0.3","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-polyfill":"^6.23.0","babel-preset-env":"^1.5.1","cross-env":"^5.0.1","del-cli":"^1.1.0","eslint":"^4.1.1","eslint-config-webpack":"^1.2.5","eslint-plugin-import":"^2.7.0","jest":"^20.0.4","lint-staged":"^4.0.1","nsp":"^2.6.3","pre-commit":"^1.2.2","rimraf":"^2.6.1","source-map":"^0.5.6","standard-version":"^4.2.0","webpack":"^3.3.0","webpack-defaults":"^1.5.0"},"peerDependencies":{"webpack":"^2.0.0 || ^3.0.0 || ^4.0.0"},"keywords":["babel","babel-minify","minify","webpack","webpack-plugin"],"repository":{"type":"git","url":"git+https://github.com/webpack-contrib/babel-minify-webpack-plugin.git"},"bugs":{"url":"https://github.com/webpack-contrib/babel-minify-webpack-plugin/issues"},"homepage":"https://github.com/webpack-contrib/babel-minify-webpack-plugin","pre-commit":"lint-staged","lint-staged":{"*.js":["eslint --fix","git add"]},"gitHead":"91abe962ece908b34c34eabe9e8caa63d847a0f2","_id":"babel-minify-webpack-plugin@0.3.1","_npmVersion":"5.7.1","_nodeVersion":"9.8.0","_npmUser":{"name":"michael-ciniawsky","email":"michael.ciniawsky@gmail.com"},"dist":{"shasum":"292aa240af190e2dcadf4f684d6d84d179b6d5a4","size":5562,"noattachment":false,"key":"/babel-minify-webpack-plugin/-/babel-minify-webpack-plugin-0.3.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/babel-minify-webpack-plugin/download/babel-minify-webpack-plugin-0.3.1.tgz"},"maintainers":[{"name":"bebraw","email":"bebraw@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/babel-minify-webpack-plugin_0.3.1_1521489201654_0.7811341378876886"},"_hasShrinkwrap":false,"publish_time":1521489201700,"_cnpm_publish_time":1521489201700},"0.3.0":{"name":"babel-minify-webpack-plugin","version":"0.3.0","description":"babel-minify plugin for webpack","author":{"name":"boopathi","url":"@boopathi"},"license":"MIT","engines":{"node":">= 4.3 < 5.0.0 || >= 5.10"},"main":"dist/cjs.js","files":["dist"],"scripts":{"appveyor:test":"npm run test","prebuild":"npm run clean","build":"cross-env NODE_ENV=production babel src -d dist --ignore 'src/**/*.test.js'","clean":"del-cli dist","fix":"eslint src/ test/*.js --fix","lint":"eslint --cache src test","lint-staged":"lint-staged","prepare":"npm run build","release":"standard-version","security":"nsp check","start":"npm run build -- -w","test":"jest","test:coverage":"jest --collectCoverageFrom='src/**/*.js' --coverage","test:watch":"jest --watch","travis:coverage":"npm run test:coverage -- --runInBand","travis:lint":"npm run lint && npm run security","travis:test":"npm run test -- --runInBand","webpack-defaults":"webpack-defaults"},"dependencies":{"babel-core":"^6.24.1","babel-preset-minify":"^0.3.0","webpack-sources":"^1.0.1"},"devDependencies":{"babel-cli":"^6.24.1","babel-jest":"^20.0.3","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-polyfill":"^6.23.0","babel-preset-env":"^1.5.1","cross-env":"^5.0.1","del-cli":"^1.1.0","eslint":"^4.1.1","eslint-config-webpack":"^1.2.5","eslint-plugin-import":"^2.7.0","jest":"^20.0.4","lint-staged":"^4.0.1","nsp":"^2.6.3","pre-commit":"^1.2.2","rimraf":"^2.6.1","source-map":"^0.5.6","standard-version":"^4.2.0","webpack":"^3.3.0","webpack-defaults":"^1.5.0"},"peerDependencies":{"webpack":"^2.0.0 || ^3.0.0"},"keywords":["babel","babel-minify","minify","webpack","webpack-plugin"],"repository":{"type":"git","url":"git+https://github.com/webpack-contrib/babel-minify-webpack-plugin.git"},"bugs":{"url":"https://github.com/webpack-contrib/babel-minify-webpack-plugin/issues"},"homepage":"https://github.com/webpack-contrib/babel-minify-webpack-plugin","pre-commit":"lint-staged","lint-staged":{"*.js":["eslint --fix","git add"]},"gitHead":"3bfde6eb0ee1b092869b8bdb235a05ea17f39da7","_id":"babel-minify-webpack-plugin@0.3.0","_npmVersion":"5.6.0","_nodeVersion":"9.5.0","_npmUser":{"name":"michael-ciniawsky","email":"michael.ciniawsky@gmail.com"},"dist":{"shasum":"98062b4b7fb96ec67cca97579151758a1ddde116","size":5438,"noattachment":false,"key":"/babel-minify-webpack-plugin/-/babel-minify-webpack-plugin-0.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/babel-minify-webpack-plugin/download/babel-minify-webpack-plugin-0.3.0.tgz"},"maintainers":[{"name":"bebraw","email":"bebraw@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/babel-minify-webpack-plugin_0.3.0_1518008698463_0.5509456251565743"},"_hasShrinkwrap":false,"publish_time":1518008699348,"_cnpm_publish_time":1518008699348},"0.2.0":{"name":"babel-minify-webpack-plugin","version":"0.2.0","description":"babel-minify plugin for webpack","keywords":["babel","babel-minify","minify","webpack","webpack-plugin"],"homepage":"https://github.com/webpack-contrib/babel-minify-webpack-plugin","bugs":{"url":"https://github.com/webpack-contrib/babel-minify-webpack-plugin/issues"},"license":"MIT","author":{"name":"boopathi"},"files":["dist"],"main":"dist/cjs.js","repository":{"type":"git","url":"git+https://github.com/webpack-contrib/babel-minify-webpack-plugin.git"},"scripts":{"appveyor:test":"npm run test","prebuild":"npm run clean","build":"cross-env NODE_ENV=production babel src -d dist --ignore 'src/**/*.test.js'","clean":"del-cli dist","fix":"eslint src/ test/*.js --fix","lint":"eslint --cache src test","lint-staged":"lint-staged","prepublish":"npm run build","release":"standard-version","security":"nsp check","start":"npm run build -- -w","test":"jest","test:coverage":"jest --collectCoverageFrom='src/**/*.js' --coverage","test:watch":"jest --watch","travis:coverage":"npm run test:coverage -- --runInBand","travis:lint":"npm run lint && npm run security","travis:test":"npm run test -- --runInBand","webpack-defaults":"webpack-defaults"},"pre-commit":"lint-staged","dependencies":{"babel-core":"^6.24.1","babel-preset-minify":"^0.2.0","webpack-sources":"^1.0.1"},"devDependencies":{"babel-cli":"^6.24.1","babel-jest":"^20.0.3","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-polyfill":"^6.23.0","babel-preset-env":"^1.5.1","cross-env":"^5.0.1","del-cli":"^1.1.0","eslint":"^4.1.1","eslint-config-webpack":"^1.2.5","eslint-plugin-import":"^2.7.0","jest":"^20.0.4","lint-staged":"^4.0.1","nsp":"^2.6.3","pre-commit":"^1.2.2","rimraf":"^2.6.1","source-map":"^0.5.6","standard-version":"^4.2.0","webpack":"^3.3.0","webpack-defaults":"^1.5.0"},"peerDependencies":{"webpack":"^2.0.0 || ^3.0.0"},"engines":{"node":">= 4.3 < 5.0.0 || >= 5.10"},"lint-staged":{"*.js":["eslint --fix","git add"]},"gitHead":"16865d783e7cc32ddeb1cea3c810edcae63f4cd6","_id":"babel-minify-webpack-plugin@0.2.0","_npmVersion":"5.3.0","_nodeVersion":"8.4.0","_npmUser":{"name":"boopathi","email":"me@boopathi.in"},"dist":{"shasum":"ef9694d11a1b8ab8f3204d89f5c9278dd28fc2a9","size":6740,"noattachment":false,"key":"/babel-minify-webpack-plugin/-/babel-minify-webpack-plugin-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/babel-minify-webpack-plugin/download/babel-minify-webpack-plugin-0.2.0.tgz"},"maintainers":[{"name":"bebraw","email":"bebraw@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/babel-minify-webpack-plugin-0.2.0.tgz_1503091523063_0.35433715395629406"},"directories":{},"publish_time":1503091524154,"_hasShrinkwrap":false,"_cnpm_publish_time":1503091524154},"0.0.0":{"name":"babel-minify-webpack-plugin","version":"0.0.0","description":"","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":[],"author":{"name":"boopathi"},"license":"MIT","_id":"babel-minify-webpack-plugin@0.0.0","_shasum":"d74c87c87d2fb952b4f4640a624f18cebcb56dc4","_from":".","_npmVersion":"3.10.5","_nodeVersion":"6.4.0","_npmUser":{"name":"boopathi","email":"me@boopathi.in"},"dist":{"shasum":"d74c87c87d2fb952b4f4640a624f18cebcb56dc4","size":282,"noattachment":false,"key":"/babel-minify-webpack-plugin/-/babel-minify-webpack-plugin-0.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/babel-minify-webpack-plugin/download/babel-minify-webpack-plugin-0.0.0.tgz"},"maintainers":[{"name":"bebraw","email":"bebraw@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/babel-minify-webpack-plugin-0.0.0.tgz_1472542809230_0.5687904083169997"},"directories":{},"publish_time":1472542810576,"_cnpm_publish_time":1472542810576,"_hasShrinkwrap":false}},"readme":"[![npm][npm]][npm-url]\n[![deps][deps]][deps-url]\n[![test][test]][test-url]\n[![coverage][cover]][cover-url]\n[![quality][quality]][quality-url]\n[![chat][chat]][chat-url]\n\n<div align=\"center\">\n  <!-- replace with accurate logo e.g from https://worldvectorlogo.com/ -->\n  <a href=\"https://github.com/webpack/webpack\">\n    <img width=\"200\" height=\"200\" vspace=\"\" hspace=\"25\"\n      src=\"https://cdn.rawgit.com/webpack/media/e7485eb2/logo/icon.svg\">\n  </a>\n  <h1>Babel Minify Webpack Plugin</h1>\n  <p>A Webpack Plugin for <a href=\"https://github.com/babel/minify\">babel-minify</a> - A babel based minifier<p>\n</div>\n\n<h2 align=\"center\">Install</h2>\n\n```bash\nnpm install babel-minify-webpack-plugin --save-dev\n```\n\n<h2 align=\"center\">Usage</h2>\n\n```js\n// webpack.config.js\nconst MinifyPlugin = require(\"babel-minify-webpack-plugin\");\nmodule.exports = {\n  entry: //...,\n  output: //...,\n  plugins: [\n    new MinifyPlugin(minifyOpts, pluginOpts)\n  ]\n}\n```\n\n<h2 align=\"center\">Options</h2>\n\n#### minifyOpts\n\n`minifyOpts` are passed on to babel-preset-minify. You can find a list of [all available options](https://github.com/babel/minify/tree/master/packages/babel-preset-minify#options) in the package directory.\n\n`Default: {}`\n\n#### pluginOpts\n\n+ `test`: Test to match files against. Default: `/\\.js($|\\?)/i`\n+ `include`: Files to `include`. Default: `undefined`\n+ `exclude`: Files to `exclude`. Default: `undefined`\n+ `comments`: Preserve Comments. Default: `/^\\**!|@preserve|@license|@cc_on/`, falsy value to remove all comments. Accepts function, object with property test (regex), and values.\n+ `sourceMap`: Configure a sourcemap style. Default: [webpackConfig.devtool](https://webpack.js.org/configuration/devtool/)\n+ `parserOpts`: Configure babel with special parser options.\n+ `babel`: Pass in a custom `babel-core` instead. Default: `require(\"babel-core\")`\n+ `minifyPreset`: Pass in a custom `babel-minify` preset instead. Default: `require(\"babel-preset-minify\")`\n\n<h2 align=\"center\">Why</h2>\n\nYou can also use [babel-loader](https://github.com/babel/babel-loader) for webpack and include `minify` [as a preset](https://github.com/babel/minify#babel-preset) and should be much faster than using this - as babel-minify will operate on smaller file sizes. But then, why does this plugin exist at all? -\n\n+ A webpack loader operates on single files and the minify preset as a webpack loader is going to consider each file to be executed directly in the browser global scope (by default) and will not optimize some things in the toplevel scope. To enable optimizations to take place in the top level scope of the file, use `mangle: { topLevel: true }` in minifyOptions.\n+ When you exclude `node_modules` from being run through the babel-loader, babel-minify optimizations are not applied to the excluded files as it doesn't pass through the minifier.\n+ When you use the babel-loader with webpack, the code generated by webpack for the module system doesn't go through the loader and is not optimized by babel-minify.\n+ A webpack plugin can operate on the entire chunk/bundle output and can optimize the whole bundle and you can see some differences in minified output. But this will be a lot slower as the file size is usually really huge. So there is [another idea](https://github.com/webpack-contrib/babel-minify-webpack-plugin/issues/8) where we can apply some optimizations as a part of the loader and some optimizations in a plugin.\n\n<h2 align=\"center\">Maintainers</h2>\n\n<table>\n  <tbody>\n    <tr>\n      <td align=\"center\">\n        <img width=\"150\" height=\"150\"\n        src=\"https://avatars2.githubusercontent.com/u/294474?v=3&s=150\">\n        </br>\n        <a href=\"https://github.com/boopathi\">Boopathi Rajaa</a>\n      </td>\n      <td align=\"center\">\n        <img width=\"150\" height=\"150\"\n        src=\"https://avatars3.githubusercontent.com/u/166921?v=3&s=150\">\n        </br>\n        <a href=\"https://github.com/bebraw\">Juho Vepsäläinen</a>\n      </td>\n      <td align=\"center\">\n        <img width=\"150\" height=\"150\"\n        src=\"https://avatars2.githubusercontent.com/u/8420490?v=3&s=150\">\n        </br>\n        <a href=\"https://github.com/d3viant0ne\">Joshua Wiens</a>\n      </td>\n      <td align=\"center\">\n        <img width=\"150\" height=\"150\"\n        src=\"https://avatars3.githubusercontent.com/u/533616?v=3&s=150\">\n        </br>\n        <a href=\"https://github.com/SpaceK33z\">Kees Kluskens</a>\n      </td>\n      <td align=\"center\">\n        <img width=\"150\" height=\"150\"\n        src=\"https://avatars3.githubusercontent.com/u/3408176?v=3&s=150\">\n        </br>\n        <a href=\"https://github.com/TheLarkInn\">Sean Larkin</a>\n      </td>\n    </tr>\n  <tbody>\n</table>\n\n[npm]: https://img.shields.io/npm/v/babel-minify-webpack-plugin.svg\n[npm-url]: https://npmjs.com/package/babel-minify-webpack-plugin\n\n[deps]: https://david-dm.org/webpack-contrib/babel-minify-webpack-plugin.svg\n[deps-url]: https://david-dm.org/webpack-contrib/babel-minify-webpack-plugin\n\n[chat]: https://img.shields.io/badge/gitter-webpack%2Fwebpack-brightgreen.svg\n[chat-url]: https://gitter.im/webpack/webpack\n\n[test]: https://travis-ci.org/webpack-contrib/babel-minify-webpack-plugin.svg?branch=master\n[test-url]: https://travis-ci.org/webpack-contrib/babel-minify-webpack-plugin\n\n[cover]: https://codecov.io/gh/webpack-contrib/babel-minify-webpack-plugin/branch/master/graph/badge.svg\n[cover-url]: https://codecov.io/gh/webpack-contrib/babel-minify-webpack-plugin\n\n[quality]: https://www.bithound.io/github/webpack-contrib/babel-minify-webpack-plugin/badges/score.svg\n[quality-url]: https://www.bithound.io/github/webpack-contrib/babel-minify-webpack-plugin\n","_attachments":{},"homepage":"https://github.com/webpack-contrib/babel-minify-webpack-plugin","bugs":{"url":"https://github.com/webpack-contrib/babel-minify-webpack-plugin/issues"},"license":"MIT"}