kopia lustrzana https://github.com/wagtail/wagtail
Combine all Webpack modes into single file
rodzic
accdbd2174
commit
d41df6ca46
|
@ -72,6 +72,12 @@ module.exports = function exports() {
|
|||
// See https://webpack.js.org/configuration/devtool/.
|
||||
devtool: 'source-map',
|
||||
|
||||
// For development mode only.
|
||||
watchOptions: {
|
||||
poll: 1000,
|
||||
aggregateTimeout: 300,
|
||||
},
|
||||
|
||||
stats: {
|
||||
// Add chunk information (setting this to `false` allows for a less verbose output)
|
||||
chunks: false,
|
|
@ -1,23 +0,0 @@
|
|||
var webpack = require('webpack');
|
||||
var base = require('./base.config');
|
||||
var config = base('development');
|
||||
|
||||
|
||||
// development overrides go here
|
||||
config.watch = true;
|
||||
|
||||
// add poll-options for in vagrant development
|
||||
// See http://andrewhfarmer.com/webpack-watch-in-vagrant-docker/
|
||||
config.watchOptions = {
|
||||
poll: 1000,
|
||||
aggregateTimeout: 300,
|
||||
};
|
||||
|
||||
// Set process.env.NODE_ENV to development to enable JS development aids.
|
||||
config.plugins.push(new webpack.DefinePlugin({
|
||||
'process.env': {
|
||||
NODE_ENV: JSON.stringify('development'),
|
||||
},
|
||||
}));
|
||||
|
||||
module.exports = config;
|
|
@ -1,30 +0,0 @@
|
|||
var webpack = require('webpack');
|
||||
var base = require('./base.config');
|
||||
var config = base('production');
|
||||
|
||||
|
||||
// production overrides go here
|
||||
config.plugins.push(new webpack.DefinePlugin({
|
||||
'process.env': {
|
||||
NODE_ENV: JSON.stringify('production'),
|
||||
},
|
||||
}));
|
||||
|
||||
// See https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/config/webpack.config.prod.js.
|
||||
config.plugins.push(new webpack.optimize.UglifyJsPlugin({
|
||||
sourceMap: true,
|
||||
|
||||
compress: {
|
||||
screw_ie8: true,
|
||||
warnings: false
|
||||
},
|
||||
mangle: {
|
||||
screw_ie8: true
|
||||
},
|
||||
output: {
|
||||
comments: false,
|
||||
screw_ie8: true
|
||||
},
|
||||
}));
|
||||
|
||||
module.exports = config;
|
Ładowanie…
Reference in New Issue