|
@@ -11,7 +11,19 @@ const ExtractTextPlugin = require('extract-text-webpack-plugin')
|
|
|
const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')
|
|
|
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
|
|
|
|
|
|
-const env = require('../config/prod.env')
|
|
|
+let env
|
|
|
+switch (process.env.ENV_ID) {
|
|
|
+ case '145':
|
|
|
+ env = require('../config/145.env')
|
|
|
+ break;
|
|
|
+ case '520':
|
|
|
+ env = require('../config/520.env')
|
|
|
+ case 'test':
|
|
|
+ env = require('../config/test.env')
|
|
|
+ default:
|
|
|
+ env = require('../config/prod.env')
|
|
|
+ break;
|
|
|
+}
|
|
|
|
|
|
const webpackConfig = merge(baseWebpackConfig, {
|
|
|
module: {
|
|
@@ -65,7 +77,7 @@ const webpackConfig = merge(baseWebpackConfig, {
|
|
|
new HtmlWebpackPlugin({
|
|
|
filename: config.build.index,
|
|
|
template: 'index.html',
|
|
|
- favicon:'./src/assets/favicon.ico',
|
|
|
+ favicon: './src/assets/favicon.ico',
|
|
|
inject: true,
|
|
|
minify: {
|
|
|
removeComments: true,
|
|
@@ -84,7 +96,7 @@ const webpackConfig = merge(baseWebpackConfig, {
|
|
|
// split vendor js into its own file
|
|
|
new webpack.optimize.CommonsChunkPlugin({
|
|
|
name: 'vendor',
|
|
|
- minChunks (module) {
|
|
|
+ minChunks(module) {
|
|
|
// any required modules inside node_modules are extracted to vendor
|
|
|
return (
|
|
|
module.resource &&
|