Package Exports
- webpack-closure-compiler
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (webpack-closure-compiler) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
webpack-closure-compiler
Google Closure Compiler plugin for Webpack
Installation
npm i -D webpack-closure-compiler
Usage
Options
compiler
A hash of options to pass to google-closure-compiler.
concurrency
The maximum number of compiler instances to run in parallel, defaults to 1.
Example
var path = require('path');
var ClosureCompilerPlugin = require('webpack-closure-compiler');
module.exports = {
entry: [
path.join(__dirname, 'app.js')
],
module: {
loaders: [
{ test: /\.js$/, exclude: /node_modules/, loaders: ['babel-loader?optional=runtime&stage=0&cacheDirectory'] }
]
},
output: {
path: path.join(__dirname, '/'),
filename: 'app.min.js'
},
plugins: [
new ClosureCompilerPlugin({
compiler: {
language_in: 'ECMASCRIPT6',
language_out: 'ECMASCRIPT5',
compilation_level: 'ADVANCED'
},
concurrency: 3,
})
]
};
License
MIT