|
@@ -12,6 +12,7 @@ module.exports = {
|
|
index: path.resolve(__dirname, 'src/js', 'index.js'),
|
|
index: path.resolve(__dirname, 'src/js', 'index.js'),
|
|
qcScore:path.resolve(__dirname, 'src/js', 'qcScore.js'),
|
|
qcScore:path.resolve(__dirname, 'src/js', 'qcScore.js'),
|
|
login:path.resolve(__dirname, 'src/js', 'login.js'),
|
|
login:path.resolve(__dirname, 'src/js', 'login.js'),
|
|
|
|
+ console:path.resolve(__dirname, 'src/js', 'console.js'),
|
|
vendor: 'lodash'// 多个页面所需的公共库文件,防止重复打包带入
|
|
vendor: 'lodash'// 多个页面所需的公共库文件,防止重复打包带入
|
|
},
|
|
},
|
|
output: {
|
|
output: {
|
|
@@ -41,7 +42,7 @@ module.exports = {
|
|
title: 'console.html',
|
|
title: 'console.html',
|
|
template: path.resolve(__dirname, 'src/html', 'console.html'),
|
|
template: path.resolve(__dirname, 'src/html', 'console.html'),
|
|
filename: 'console.html',
|
|
filename: 'console.html',
|
|
- chunks: ['index', 'vendor', 'common'],
|
|
|
|
|
|
+ chunks: ['console', 'vendor', 'common'],
|
|
hash: true, //防止缓存
|
|
hash: true, //防止缓存
|
|
inject: true,
|
|
inject: true,
|
|
minify: {
|
|
minify: {
|
|
@@ -192,6 +193,14 @@ module.exports = {
|
|
presets:['@babel/preset-env']
|
|
presets:['@babel/preset-env']
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ test: /\.css$/,
|
|
|
|
+ use: [{
|
|
|
|
+ loader: MiniCssExtractPlugin.loader
|
|
|
|
+ },
|
|
|
|
+ 'css-loader'
|
|
|
|
+ ]
|
|
},
|
|
},
|
|
{
|
|
{
|
|
test: /\.less$/,
|
|
test: /\.less$/,
|
|
@@ -233,7 +242,7 @@ module.exports = {
|
|
'/': proxyHost
|
|
'/': proxyHost
|
|
},
|
|
},
|
|
hot: true,
|
|
hot: true,
|
|
- openPage:'index.html'
|
|
|
|
|
|
+ openPage:'login.html'
|
|
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|