mirror of
https://github.com/embarklabs/embark.git
synced 2025-01-26 21:51:06 +00:00
webpack compression plugin (activated in production config)
This commit is contained in:
parent
16856eadf0
commit
4acf0ad58d
@ -18,6 +18,7 @@
|
|||||||
// there's a bug in pkg clone-deep re: regex; for now use lodash.clonedeep
|
// there's a bug in pkg clone-deep re: regex; for now use lodash.clonedeep
|
||||||
// see: https://github.com/jonschlinkert/clone-deep/pull/14
|
// see: https://github.com/jonschlinkert/clone-deep/pull/14
|
||||||
const cloneDeep = require('lodash.clonedeep');
|
const cloneDeep = require('lodash.clonedeep');
|
||||||
|
const CompressionPlugin = require('compression-webpack-plugin');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const glob = require('glob');
|
const glob = require('glob');
|
||||||
const HardSourceWebpackPlugin = require('hard-source-webpack-plugin');
|
const HardSourceWebpackPlugin = require('hard-source-webpack-plugin');
|
||||||
@ -156,6 +157,7 @@ devBabelLoader.options.compact = false;
|
|||||||
const production = cloneDeep(base);
|
const production = cloneDeep(base);
|
||||||
production.mode = 'production';
|
production.mode = 'production';
|
||||||
production.name = 'production';
|
production.name = 'production';
|
||||||
|
production.plugins.push(new CompressionPlugin());
|
||||||
|
|
||||||
// export a list of named configs
|
// export a list of named configs
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user