mirror of
https://github.com/embarklabs/embark.git
synced 2025-01-11 22:34:24 +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
|
||||
// see: https://github.com/jonschlinkert/clone-deep/pull/14
|
||||
const cloneDeep = require('lodash.clonedeep');
|
||||
const CompressionPlugin = require('compression-webpack-plugin');
|
||||
const fs = require('fs');
|
||||
const glob = require('glob');
|
||||
const HardSourceWebpackPlugin = require('hard-source-webpack-plugin');
|
||||
@ -156,6 +157,7 @@ devBabelLoader.options.compact = false;
|
||||
const production = cloneDeep(base);
|
||||
production.mode = 'production';
|
||||
production.name = 'production';
|
||||
production.plugins.push(new CompressionPlugin());
|
||||
|
||||
// export a list of named configs
|
||||
// -----------------------------------------------------------------------------
|
||||
|
Loading…
x
Reference in New Issue
Block a user