|
@@ -10,6 +10,9 @@ const proxyHost = "http://192.168.2.236:5858";
|
|
|
module.exports = {
|
|
|
entry: {
|
|
|
index: path.resolve(__dirname, 'src/js', 'index.js'),
|
|
|
+ qcScore:path.resolve(__dirname, 'src/js', 'qcScore.js'),
|
|
|
+ login:path.resolve(__dirname, 'src/js', 'login.js'),
|
|
|
+ console:path.resolve(__dirname, 'src/js', 'console.js'),
|
|
|
moduleManager: path.resolve(__dirname, 'src/js', 'moduleManager.js'),
|
|
|
itemManager: path.resolve(__dirname, 'src/js', 'itemManager.js'),
|
|
|
qcList: path.resolve(__dirname, 'src/js', 'qcList.js'),
|
|
@@ -24,7 +27,7 @@ module.exports = {
|
|
|
extensions: [".js", ".css", ".json"],
|
|
|
alias: {} //配置别名可以加快webpack查找模块的速度
|
|
|
},
|
|
|
- plugins: [// 多入口的html文件用chunks这个参数来区分
|
|
|
+ plugins: [//多入口的html文件用chunks这个参数来区分
|
|
|
new HtmlWebpackPlugin({
|
|
|
title: 'index',
|
|
|
template: path.resolve(__dirname, 'src/html', 'index.html'),
|
|
@@ -42,7 +45,7 @@ module.exports = {
|
|
|
title: 'console.html',
|
|
|
template: path.resolve(__dirname, 'src/html', 'console.html'),
|
|
|
filename: 'console.html',
|
|
|
- chunks: ['index', 'vendor', 'common'],
|
|
|
+ chunks: ['console', 'vendor', 'common'],
|
|
|
hash: true, //防止缓存
|
|
|
inject: true,
|
|
|
minify: {
|
|
@@ -81,7 +84,7 @@ module.exports = {
|
|
|
title: 'login.html',
|
|
|
template: path.resolve(__dirname, 'src/html', 'login.html'),
|
|
|
filename: 'login.html',
|
|
|
- chunks: ['index', 'vendor', 'common'],
|
|
|
+ chunks: ['login', 'vendor', 'common'],
|
|
|
hash: true, //防止缓存
|
|
|
inject: true,
|
|
|
minify: {
|
|
@@ -107,7 +110,7 @@ module.exports = {
|
|
|
title: 'qcScore.html',
|
|
|
template: path.resolve(__dirname, 'src/html', 'qcScore.html'),
|
|
|
filename: 'qcScore.html',
|
|
|
- chunks: ['index', 'vendor', 'common'],
|
|
|
+ chunks: ['index', 'vendor', 'common','qcScore'],
|
|
|
hash: true, //防止缓存
|
|
|
inject: true,
|
|
|
minify: {
|
|
@@ -200,16 +203,7 @@ module.exports = {
|
|
|
use: [{
|
|
|
loader: MiniCssExtractPlugin.loader
|
|
|
},
|
|
|
- {
|
|
|
- loader: 'css-loader',
|
|
|
- options: {
|
|
|
- modules: true,
|
|
|
- getLocalIdent: (context, localIdentName, localName, options) =>{
|
|
|
- return localName
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
+ 'css-loader'
|
|
|
]
|
|
|
},
|
|
|
{
|
|
@@ -252,7 +246,7 @@ module.exports = {
|
|
|
'/': proxyHost
|
|
|
},
|
|
|
hot: true,
|
|
|
- // openPage:'index.html'
|
|
|
- openPage:'moduleManager.html'
|
|
|
+ openPage:'index.html'
|
|
|
+
|
|
|
}
|
|
|
}
|