|
@@ -7,17 +7,13 @@ const webpack = require('webpack');
|
|
const proxyHost = "http://192.168.2.236:5050";
|
|
const proxyHost = "http://192.168.2.236:5050";
|
|
module.exports = {
|
|
module.exports = {
|
|
entry: {
|
|
entry: {
|
|
- landscapePage: path.resolve(__dirname, 'src', 'landscapePage.js'),
|
|
|
|
- landscape: path.resolve(__dirname, 'src', 'landscape.js'),
|
|
|
|
- landscapeMedical: path.resolve(__dirname, 'src/js', 'landscapeMedical.js'),
|
|
|
|
- index: path.resolve(__dirname, 'src', 'index.js'),
|
|
|
|
|
|
+ index: path.resolve(__dirname, 'src/js', 'index.js'),
|
|
page: path.resolve(__dirname, 'src', 'page.js'),
|
|
page: path.resolve(__dirname, 'src', 'page.js'),
|
|
information: path.resolve(__dirname, 'src/js', 'information.js'),
|
|
information: path.resolve(__dirname, 'src/js', 'information.js'),
|
|
disclaimer: path.resolve(__dirname, 'src/js', 'disclaimer.js'),
|
|
disclaimer: path.resolve(__dirname, 'src/js', 'disclaimer.js'),
|
|
scale: path.resolve(__dirname, 'src/js', 'scale.js'),
|
|
scale: path.resolve(__dirname, 'src/js', 'scale.js'),
|
|
illness: path.resolve(__dirname, 'src/js', 'illness.js'),
|
|
illness: path.resolve(__dirname, 'src/js', 'illness.js'),
|
|
treatplan: path.resolve(__dirname, 'src/js', 'treatplan.js'),
|
|
treatplan: path.resolve(__dirname, 'src/js', 'treatplan.js'),
|
|
- indexVert: path.resolve(__dirname, 'src/js', 'indexVert.js'),
|
|
|
|
indexHorizontal: path.resolve(__dirname, 'src/js', 'indexHorizontal.js'),
|
|
indexHorizontal: path.resolve(__dirname, 'src/js', 'indexHorizontal.js'),
|
|
vendor: 'lodash'// 多个页面所需的公共库文件,防止重复打包带入
|
|
vendor: 'lodash'// 多个页面所需的公共库文件,防止重复打包带入
|
|
},
|
|
},
|
|
@@ -83,19 +79,6 @@ module.exports = {
|
|
collapseWhitespace: true //删除空白符与换行符
|
|
collapseWhitespace: true //删除空白符与换行符
|
|
}
|
|
}
|
|
}),
|
|
}),
|
|
- new HtmlWebpackPlugin({
|
|
|
|
- title: 'landscapePage',
|
|
|
|
- template: path.resolve(__dirname, 'src/html', 'landscapePage.html'),
|
|
|
|
- filename: 'landscapePage.html',
|
|
|
|
- chunks: ['landscapePage', 'vendor', 'common'],
|
|
|
|
- inject: true,
|
|
|
|
- hash: true, //防止缓存
|
|
|
|
- minify: {
|
|
|
|
- removeAttributeQuotes: true, //压缩 去掉引号
|
|
|
|
- removeComments: true, //移除HTML中的注释
|
|
|
|
- collapseWhitespace: true //删除空白符与换行符
|
|
|
|
- }
|
|
|
|
- }),
|
|
|
|
new HtmlWebpackPlugin({
|
|
new HtmlWebpackPlugin({
|
|
title: 'information',
|
|
title: 'information',
|
|
template: path.resolve(__dirname, 'src/html', 'information.html'),
|
|
template: path.resolve(__dirname, 'src/html', 'information.html'),
|
|
@@ -148,32 +131,6 @@ module.exports = {
|
|
collapseWhitespace: true //删除空白符与换行符
|
|
collapseWhitespace: true //删除空白符与换行符
|
|
}
|
|
}
|
|
}),
|
|
}),
|
|
- new HtmlWebpackPlugin({
|
|
|
|
- title: 'landscape',
|
|
|
|
- template: path.resolve(__dirname, 'src/html', 'landscape.html'),
|
|
|
|
- filename: 'landscape.html',
|
|
|
|
- chunks: ['landscape', 'vendor', 'common'],
|
|
|
|
- inject: true,
|
|
|
|
- hash: true, //防止缓存
|
|
|
|
- minify: {
|
|
|
|
- removeAttributeQuotes: true, //压缩 去掉引号
|
|
|
|
- removeComments: true, //移除HTML中的注释
|
|
|
|
- collapseWhitespace: true //删除空白符与换行符
|
|
|
|
- }
|
|
|
|
- }),
|
|
|
|
- new HtmlWebpackPlugin({
|
|
|
|
- title: 'landscapeMedical',
|
|
|
|
- template: path.resolve(__dirname, 'src/html', 'landscapeMedical.html'),
|
|
|
|
- filename: 'landscapeMedical.html',
|
|
|
|
- chunks: ['landscapeMedical', 'vendor', 'common'],
|
|
|
|
- inject: true,
|
|
|
|
- hash: true, //防止缓存
|
|
|
|
- minify: {
|
|
|
|
- removeAttributeQuotes: true, //压缩 去掉引号
|
|
|
|
- removeComments: true, //移除HTML中的注释
|
|
|
|
- collapseWhitespace: true //删除空白符与换行符
|
|
|
|
- }
|
|
|
|
- }),
|
|
|
|
new HtmlWebpackPlugin({
|
|
new HtmlWebpackPlugin({
|
|
title: 'indexHorizontal',
|
|
title: 'indexHorizontal',
|
|
template: path.resolve(__dirname, 'src/html', 'indexHorizontal.html'),
|
|
template: path.resolve(__dirname, 'src/html', 'indexHorizontal.html'),
|
|
@@ -187,19 +144,6 @@ module.exports = {
|
|
collapseWhitespace: true //删除空白符与换行符
|
|
collapseWhitespace: true //删除空白符与换行符
|
|
}
|
|
}
|
|
}),
|
|
}),
|
|
- new HtmlWebpackPlugin({
|
|
|
|
- title: 'indexVert',
|
|
|
|
- template: path.resolve(__dirname, 'src/html', 'indexVert.html'),
|
|
|
|
- filename: 'indexVert.html',
|
|
|
|
- chunks: ['indexVert', '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'
|