|
@@ -4,30 +4,23 @@ const CleanWebpackPlugin = require('clean-webpack-plugin') // 清空打包目录
|
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
|
|
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
|
|
const webpack = require('webpack');
|
|
const webpack = require('webpack');
|
|
-const proxyHost = "http://192.168.2.236:6060";
|
|
|
|
|
|
+const proxyHost = "http://192.168.2.241:6060";
|
|
module.exports = {
|
|
module.exports = {
|
|
entry: {
|
|
entry: {
|
|
- index: path.resolve(__dirname, 'src/js', 'index.js'),
|
|
|
|
- page: path.resolve(__dirname, 'src', 'page.js'),
|
|
|
|
- information: path.resolve(__dirname, 'src/js', 'information.js'),
|
|
|
|
|
|
+ //index: path.resolve(__dirname, 'src/js', 'index.js'),
|
|
|
|
+ //information: path.resolve(__dirname, 'src/js', 'information.js'),
|
|
informationOut: path.resolve(__dirname, 'src/js', 'informationOut.js'),
|
|
informationOut: path.resolve(__dirname, 'src/js', 'informationOut.js'),
|
|
disclaimer: path.resolve(__dirname, 'src/js', 'disclaimer.js'),
|
|
disclaimer: path.resolve(__dirname, 'src/js', 'disclaimer.js'),
|
|
version: path.resolve(__dirname, 'src/js', 'version.js'),
|
|
version: path.resolve(__dirname, 'src/js', 'version.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'),
|
|
|
|
- treatplan: path.resolve(__dirname, 'src/js', 'treatplan.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'),
|
|
emergency: path.resolve(__dirname, 'src/js', 'emergency.js'),
|
|
- icssIndex: path.resolve(__dirname, 'src/js', 'icssIndex.js'),
|
|
|
|
- view: path.resolve(__dirname, 'src/js', 'view.js'),
|
|
|
|
cdss: path.resolve(__dirname, 'src/js', 'cdss.js'),
|
|
cdss: path.resolve(__dirname, 'src/js', 'cdss.js'),
|
|
cdssHorizontal: path.resolve(__dirname, 'src/js', 'cdssHorizontal.js'),
|
|
cdssHorizontal: path.resolve(__dirname, 'src/js', 'cdssHorizontal.js'),
|
|
smartAlert: path.resolve(__dirname, 'src/js', 'smartAlert.js'),
|
|
smartAlert: path.resolve(__dirname, 'src/js', 'smartAlert.js'),
|
|
caseWriteStandard: path.resolve(__dirname, 'src/js', 'caseWriteStandard.js'),
|
|
caseWriteStandard: path.resolve(__dirname, 'src/js', 'caseWriteStandard.js'),
|
|
generalTreat:path.resolve(__dirname, 'src/js', 'generalTreat.js'),
|
|
generalTreat:path.resolve(__dirname, 'src/js', 'generalTreat.js'),
|
|
cdssPlan:path.resolve(__dirname, 'src/js', 'cdssPlan.js'),
|
|
cdssPlan:path.resolve(__dirname, 'src/js', 'cdssPlan.js'),
|
|
- check:path.resolve(__dirname, 'src/js', 'check.js'),
|
|
|
|
homeStatic:path.resolve(__dirname, 'src/js', 'homeStatic.js'),
|
|
homeStatic:path.resolve(__dirname, 'src/js', 'homeStatic.js'),
|
|
searchStaticList:path.resolve(__dirname, 'src/js', 'searchStaticList.js'),
|
|
searchStaticList:path.resolve(__dirname, 'src/js', 'searchStaticList.js'),
|
|
staticInfo:path.resolve(__dirname, 'src/js', 'staticInfo.js'),
|
|
staticInfo:path.resolve(__dirname, 'src/js', 'staticInfo.js'),
|
|
@@ -44,19 +37,6 @@ module.exports = {
|
|
alias: {} //配置别名可以加快webpack查找模块的速度
|
|
alias: {} //配置别名可以加快webpack查找模块的速度
|
|
},
|
|
},
|
|
plugins: [// 多入口的html文件用chunks这个参数来区分
|
|
plugins: [// 多入口的html文件用chunks这个参数来区分
|
|
- new HtmlWebpackPlugin({
|
|
|
|
- title: 'index',
|
|
|
|
- template: path.resolve(__dirname, 'src/html', 'index.html'),
|
|
|
|
- filename: 'index.html',
|
|
|
|
- chunks: ['index', 'vendor', 'common'],
|
|
|
|
- inject: true,
|
|
|
|
- hash: true, //防止缓存
|
|
|
|
- minify: {
|
|
|
|
- removeAttributeQuotes: true, //压缩 去掉引号
|
|
|
|
- removeComments: true, //移除HTML中的注释
|
|
|
|
- collapseWhitespace: true //删除空白符与换行符
|
|
|
|
- }
|
|
|
|
- }),
|
|
|
|
new HtmlWebpackPlugin({
|
|
new HtmlWebpackPlugin({
|
|
title: 'homeStatic',
|
|
title: 'homeStatic',
|
|
template: path.resolve(__dirname, 'src/html', 'homeStatic.html'),
|
|
template: path.resolve(__dirname, 'src/html', 'homeStatic.html'),
|
|
@@ -70,19 +50,6 @@ module.exports = {
|
|
collapseWhitespace: true //删除空白符与换行符
|
|
collapseWhitespace: true //删除空白符与换行符
|
|
}
|
|
}
|
|
}),
|
|
}),
|
|
- /*new HtmlWebpackPlugin({
|
|
|
|
- title: 'staticInfoOut',
|
|
|
|
- template: path.resolve(__dirname, 'src/html', 'informationOut.html'),
|
|
|
|
- filename: 'informationOut.html',
|
|
|
|
- chunks: ['staticInfoOut', 'vendor', 'common'],
|
|
|
|
- inject: true,
|
|
|
|
- hash: true, //防止缓存
|
|
|
|
- minify: {
|
|
|
|
- removeAttributeQuotes: true, //压缩 去掉引号
|
|
|
|
- removeComments: true, //移除HTML中的注释
|
|
|
|
- collapseWhitespace: true //删除空白符与换行符
|
|
|
|
- }
|
|
|
|
- }),*/
|
|
|
|
new HtmlWebpackPlugin({
|
|
new HtmlWebpackPlugin({
|
|
title: 'staticInfo',
|
|
title: 'staticInfo',
|
|
template: path.resolve(__dirname, 'src/html', 'staticInfo.html'),
|
|
template: path.resolve(__dirname, 'src/html', 'staticInfo.html'),
|
|
@@ -109,19 +76,6 @@ module.exports = {
|
|
collapseWhitespace: true //删除空白符与换行符
|
|
collapseWhitespace: true //删除空白符与换行符
|
|
}
|
|
}
|
|
}),
|
|
}),
|
|
- new HtmlWebpackPlugin({
|
|
|
|
- title: 'index',
|
|
|
|
- template: path.resolve(__dirname, 'src/html', 'check.html'),
|
|
|
|
- filename: 'check.html',
|
|
|
|
- chunks: ['check', 'vendor', 'common'],
|
|
|
|
- inject: true,
|
|
|
|
- hash: true, //防止缓存
|
|
|
|
- minify: {
|
|
|
|
- removeAttributeQuotes: true, //压缩 去掉引号
|
|
|
|
- removeComments: true, //移除HTML中的注释
|
|
|
|
- collapseWhitespace: true //删除空白符与换行符
|
|
|
|
- }
|
|
|
|
- }),
|
|
|
|
new HtmlWebpackPlugin({
|
|
new HtmlWebpackPlugin({
|
|
title: '智能警示',
|
|
title: '智能警示',
|
|
template: path.resolve(__dirname, 'src/html', 'smartAlert.html'),
|
|
template: path.resolve(__dirname, 'src/html', 'smartAlert.html'),
|
|
@@ -174,46 +128,7 @@ module.exports = {
|
|
collapseWhitespace: true //删除空白符与换行符
|
|
collapseWhitespace: true //删除空白符与换行符
|
|
}
|
|
}
|
|
}),
|
|
}),
|
|
- new HtmlWebpackPlugin({
|
|
|
|
- title: '病情提示',
|
|
|
|
- template: path.resolve(__dirname, 'src/html', 'illness.html'),
|
|
|
|
- filename: 'illness.html',
|
|
|
|
- chunks: ['illness', 'vendor', 'common'],
|
|
|
|
- inject: true,
|
|
|
|
- hash: true, //防止缓存
|
|
|
|
- minify: {
|
|
|
|
- removeAttributeQuotes: true, //压缩 去掉引号
|
|
|
|
- removeComments: true, //移除HTML中的注释
|
|
|
|
- collapseWhitespace: true //删除空白符与换行符
|
|
|
|
- }
|
|
|
|
- }),
|
|
|
|
- new HtmlWebpackPlugin({
|
|
|
|
- title: '治疗方案',
|
|
|
|
- template: path.resolve(__dirname, 'src/html', 'treatplan.html'),
|
|
|
|
- filename: 'treatplan.html',
|
|
|
|
- chunks: ['treatplan', 'vendor', 'common'],
|
|
|
|
- inject: true,
|
|
|
|
- hash: true, //防止缓存
|
|
|
|
- minify: {
|
|
|
|
- removeAttributeQuotes: true, //压缩 去掉引号
|
|
|
|
- removeComments: true, //移除HTML中的注释
|
|
|
|
- collapseWhitespace: true //删除空白符与换行符
|
|
|
|
- }
|
|
|
|
- }),
|
|
|
|
- new HtmlWebpackPlugin({
|
|
|
|
- title: 'page',
|
|
|
|
- template: path.resolve(__dirname, 'src/html', 'page.html'),
|
|
|
|
- filename: 'page.html',
|
|
|
|
- chunks: ['page', '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'),
|
|
filename: 'information.html',
|
|
filename: 'information.html',
|
|
@@ -225,7 +140,7 @@ module.exports = {
|
|
removeComments: true, //移除HTML中的注释
|
|
removeComments: true, //移除HTML中的注释
|
|
collapseWhitespace: true //删除空白符与换行符
|
|
collapseWhitespace: true //删除空白符与换行符
|
|
}
|
|
}
|
|
- }),
|
|
|
|
|
|
+ }),*/
|
|
new HtmlWebpackPlugin({
|
|
new HtmlWebpackPlugin({
|
|
title: 'informationOut',
|
|
title: 'informationOut',
|
|
template: path.resolve(__dirname, 'src/html', 'informationOut.html'),
|
|
template: path.resolve(__dirname, 'src/html', 'informationOut.html'),
|
|
@@ -239,19 +154,6 @@ module.exports = {
|
|
collapseWhitespace: true //删除空白符与换行符
|
|
collapseWhitespace: true //删除空白符与换行符
|
|
}
|
|
}
|
|
}),
|
|
}),
|
|
- new HtmlWebpackPlugin({
|
|
|
|
- title: 'drugInfo',
|
|
|
|
- template: path.resolve(__dirname, 'src/html', 'drugInfo.html'),
|
|
|
|
- filename: 'drugInfo.html',
|
|
|
|
- chunks: ['information', 'vendor', 'common'],
|
|
|
|
- inject: true,
|
|
|
|
- hash: true, //防止缓存
|
|
|
|
- minify: {
|
|
|
|
- removeAttributeQuotes: true, //压缩 去掉引号
|
|
|
|
- removeComments: true, //移除HTML中的注释
|
|
|
|
- collapseWhitespace: true //删除空白符与换行符
|
|
|
|
- }
|
|
|
|
- }),
|
|
|
|
new HtmlWebpackPlugin({
|
|
new HtmlWebpackPlugin({
|
|
title: '免责声明',
|
|
title: '免责声明',
|
|
template: path.resolve(__dirname, 'src/html', 'disclaimer.html'),
|
|
template: path.resolve(__dirname, 'src/html', 'disclaimer.html'),
|
|
@@ -291,32 +193,6 @@ module.exports = {
|
|
collapseWhitespace: true //删除空白符与换行符
|
|
collapseWhitespace: true //删除空白符与换行符
|
|
}
|
|
}
|
|
}),
|
|
}),
|
|
- new HtmlWebpackPlugin({
|
|
|
|
- title: 'indexHorizontal',
|
|
|
|
- template: path.resolve(__dirname, 'src/html', 'indexHorizontal.html'),
|
|
|
|
- filename: 'indexHorizontal.html',
|
|
|
|
- chunks: ['indexHorizontal', 'vendor', 'common'],
|
|
|
|
- inject: true,
|
|
|
|
- hash: true, //防止缓存
|
|
|
|
- minify: {
|
|
|
|
- removeAttributeQuotes: true, //压缩 去掉引号
|
|
|
|
- removeComments: true, //移除HTML中的注释
|
|
|
|
- collapseWhitespace: true //删除空白符与换行符
|
|
|
|
- }
|
|
|
|
- }),
|
|
|
|
- new HtmlWebpackPlugin({
|
|
|
|
- title: 'staticSearch',
|
|
|
|
- template: path.resolve(__dirname, 'src/html', 'staticSearch.html'),
|
|
|
|
- filename: 'staticSearch.html',
|
|
|
|
- chunks: ['staticSearch', 'vendor', 'common'],
|
|
|
|
- inject: true,
|
|
|
|
- hash: true, //防止缓存
|
|
|
|
- minify: {
|
|
|
|
- removeAttributeQuotes: true, //压缩 去掉引号
|
|
|
|
- removeComments: true, //移除HTML中的注释
|
|
|
|
- collapseWhitespace: true //删除空白符与换行符
|
|
|
|
- }
|
|
|
|
- }),
|
|
|
|
new HtmlWebpackPlugin({
|
|
new HtmlWebpackPlugin({
|
|
title: 'emergency',
|
|
title: 'emergency',
|
|
template: path.resolve(__dirname, 'src/html', 'emergency.html'),
|
|
template: path.resolve(__dirname, 'src/html', 'emergency.html'),
|
|
@@ -330,19 +206,6 @@ module.exports = {
|
|
collapseWhitespace: true //删除空白符与换行符
|
|
collapseWhitespace: true //删除空白符与换行符
|
|
}
|
|
}
|
|
}),
|
|
}),
|
|
- new HtmlWebpackPlugin({
|
|
|
|
- title: 'icssIndex',
|
|
|
|
- template: path.resolve(__dirname, 'src/html', 'icssIndex.html'),
|
|
|
|
- filename: 'icssIndex.html',
|
|
|
|
- chunks: ['icssIndex', 'vendor', 'common'],
|
|
|
|
- inject: true,
|
|
|
|
- hash: true, //防止缓存
|
|
|
|
- minify: {
|
|
|
|
- removeAttributeQuotes: true, //压缩 去掉引号
|
|
|
|
- removeComments: true, //移除HTML中的注释
|
|
|
|
- collapseWhitespace: true //删除空白符与换行符
|
|
|
|
- }
|
|
|
|
- }),
|
|
|
|
new HtmlWebpackPlugin({
|
|
new HtmlWebpackPlugin({
|
|
title: 'cdss',
|
|
title: 'cdss',
|
|
template: path.resolve(__dirname, 'src/html', 'cdss.html'),
|
|
template: path.resolve(__dirname, 'src/html', 'cdss.html'),
|
|
@@ -357,7 +220,7 @@ module.exports = {
|
|
}
|
|
}
|
|
}),
|
|
}),
|
|
new HtmlWebpackPlugin({
|
|
new HtmlWebpackPlugin({
|
|
- title: 'cdss',
|
|
|
|
|
|
+ title: 'cdssHorizontal',
|
|
template: path.resolve(__dirname, 'src/html', 'cdssHorizontal.html'),
|
|
template: path.resolve(__dirname, 'src/html', 'cdssHorizontal.html'),
|
|
filename: 'cdssHorizontal.html',
|
|
filename: 'cdssHorizontal.html',
|
|
chunks: ['cdssHorizontal', 'vendor', 'common'],
|
|
chunks: ['cdssHorizontal', 'vendor', 'common'],
|
|
@@ -369,7 +232,6 @@ module.exports = {
|
|
collapseWhitespace: true //删除空白符与换行符
|
|
collapseWhitespace: true //删除空白符与换行符
|
|
}
|
|
}
|
|
}),
|
|
}),
|
|
-
|
|
|
|
new HtmlWebpackPlugin({
|
|
new HtmlWebpackPlugin({
|
|
title: 'view',
|
|
title: 'view',
|
|
template: path.resolve(__dirname, 'src/html', 'view.html'),
|
|
template: path.resolve(__dirname, 'src/html', 'view.html'),
|