|
@@ -17,6 +17,7 @@ module.exports = {
|
|
treatplan: path.resolve(__dirname, 'src/js', 'treatplan.js'),
|
|
treatplan: path.resolve(__dirname, 'src/js', 'treatplan.js'),
|
|
indexHorizontal: path.resolve(__dirname, 'src/js', 'indexHorizontal.js'),
|
|
indexHorizontal: path.resolve(__dirname, 'src/js', 'indexHorizontal.js'),
|
|
staticSearch: path.resolve(__dirname, 'src/js', 'staticSearch.js'),
|
|
staticSearch: path.resolve(__dirname, 'src/js', 'staticSearch.js'),
|
|
|
|
+ emergency: path.resolve(__dirname, 'src/js', 'emergency.js'),
|
|
vendor: 'lodash'// 多个页面所需的公共库文件,防止重复打包带入
|
|
vendor: 'lodash'// 多个页面所需的公共库文件,防止重复打包带入
|
|
},
|
|
},
|
|
output: {
|
|
output: {
|
|
@@ -172,6 +173,19 @@ module.exports = {
|
|
collapseWhitespace: true //删除空白符与换行符
|
|
collapseWhitespace: true //删除空白符与换行符
|
|
}
|
|
}
|
|
}),
|
|
}),
|
|
|
|
+ new HtmlWebpackPlugin({
|
|
|
|
+ title: 'emergency',
|
|
|
|
+ template: path.resolve(__dirname, 'src/html', 'emergency.html'),
|
|
|
|
+ filename: 'emergency.html',
|
|
|
|
+ chunks: ['emergency', 'vendor', 'common'],
|
|
|
|
+ inject: true,
|
|
|
|
+ hash: true, //防止缓存
|
|
|
|
+ minify: {
|
|
|
|
+ removeAttributeQuotes: true, //压缩 去掉引号
|
|
|
|
+ removeComments: true, //移除HTML中的注释
|
|
|
|
+ collapseWhitespace: true //删除空白符与换行符
|
|
|
|
+ }
|
|
|
|
+ }),
|
|
new MiniCssExtractPlugin({
|
|
new MiniCssExtractPlugin({
|
|
filename: 'css/[name].css',
|
|
filename: 'css/[name].css',
|
|
chunkFilename: '[id].css'
|
|
chunkFilename: '[id].css'
|