webpack-plugin-output-babel
v0.0.2
Published
Apply Babel transforms to ouptut chunks.
Downloads
8
Readme
webpack-output-babel
A Webpack plugin to apply Babel transforms to output chunks.
Usage
In webpack.config.js
:
const OutputBabelPlugin = require('webpack-plugin-output-babel');
const babelOptions = {
plugins: ['transform-remove-console', 'transform-minify-booleans'],
compact: true
};
module.exports = {
...
plugins: [
new OutputBabelPlugin(babelOptions)
]
};
All plugin options are passed to Babel – use the same keys as in
.babelrc
.
Installation
npm install webpack webpack-plugin-output-babel
Caveats
No attempt is currently made to preserve source maps.