|
@@ -1,16 +1,24 @@
|
|
'use strict'
|
|
'use strict'
|
|
|
|
|
|
const webpack = require('webpack')
|
|
const webpack = require('webpack')
|
|
|
|
+const CopyWebpackPlugin = require('copy-webpack-plugin')
|
|
const merge = require('webpack-merge')
|
|
const merge = require('webpack-merge')
|
|
const baseConfig = require('./webpack.config.base')
|
|
const baseConfig = require('./webpack.config.base')
|
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
|
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
|
|
|
|
|
|
|
|
+const utils = require('./utils')
|
|
|
|
+
|
|
const UglifyJSPlugin = require('uglifyjs-webpack-plugin')
|
|
const UglifyJSPlugin = require('uglifyjs-webpack-plugin')
|
|
// ERROR in vendor.js from UglifyJs
|
|
// ERROR in vendor.js from UglifyJs
|
|
// RangeError: Maximum call stack size exceeded
|
|
// RangeError: Maximum call stack size exceeded
|
|
|
|
|
|
module.exports = merge(baseConfig, {
|
|
module.exports = merge(baseConfig, {
|
|
mode: 'production',
|
|
mode: 'production',
|
|
|
|
+ // resolve: {
|
|
|
|
+ // alias: {
|
|
|
|
+ // 'static': utils.resolve('static')
|
|
|
|
+ // }
|
|
|
|
+ // },
|
|
output: {
|
|
output: {
|
|
publicPath: '/'
|
|
publicPath: '/'
|
|
},
|
|
},
|
|
@@ -66,6 +74,11 @@ module.exports = merge(baseConfig, {
|
|
}),
|
|
}),
|
|
new webpack.DefinePlugin({
|
|
new webpack.DefinePlugin({
|
|
"process.env": "'prod'"
|
|
"process.env": "'prod'"
|
|
- })
|
|
|
|
|
|
+ }),
|
|
|
|
+ new CopyWebpackPlugin([{
|
|
|
|
+ from: utils.resolve('static/.htaccess'),
|
|
|
|
+ to: utils.resolve('dist/.htaccess'),
|
|
|
|
+ toType: 'file'
|
|
|
|
+ }])
|
|
]
|
|
]
|
|
})
|
|
})
|