|
|
const webpack = require('webpack');
|
|
|
const path = require('path');
|
|
|
const shelljs = require('shelljs');
|
|
|
const {cssLoader} = require('./utils.js');
|
...
|
...
|
@@ -12,6 +11,7 @@ shelljs.cp('-R', path.join(__dirname, '../img/'), distDir); |
|
|
shelljs.cp('-R', path.join(__dirname, '../font/'), distDir);
|
|
|
|
|
|
let webpackConfig = {
|
|
|
mode: 'production',
|
|
|
entry: {
|
|
|
index: [path.join(__dirname, '../scss/index.css')]
|
|
|
},
|
...
|
...
|
@@ -25,13 +25,15 @@ let webpackConfig = { |
|
|
use: cssLoader('pro', 'css')
|
|
|
}]
|
|
|
},
|
|
|
stats: {
|
|
|
children: false
|
|
|
},
|
|
|
performance: {
|
|
|
maxEntrypointSize: 5120000,
|
|
|
maxAssetSize: 5120000
|
|
|
},
|
|
|
plugins: [
|
|
|
new ExtractTextPlugin('[name].css'),
|
|
|
new webpack.DefinePlugin({
|
|
|
'process.env': {
|
|
|
NODE_ENV: '"production"'
|
|
|
}
|
|
|
})
|
|
|
new ExtractTextPlugin('[name].css')
|
|
|
]
|
|
|
};
|
|
|
|
...
|
...
|
|