|
@@ -5,13 +5,14 @@ const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
|
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
|
|
|
const ExtractTextPlugin = require("extract-text-webpack-plugin");
|
|
|
const webpack = require('webpack');
|
|
|
-const proxyHost = "http://192.168.2.121:5050";
|
|
|
+const proxyHost = "http://192.168.2.236:5050";
|
|
|
// const proxyHost = "http://192.168.3.119:5050";
|
|
|
module.exports = {
|
|
|
entry: {
|
|
|
index: path.resolve(__dirname, 'src/js', 'index.js'),
|
|
|
knowledgeTree: path.resolve(__dirname, 'src/js', 'knowledgeTree.js'),
|
|
|
participle: path.resolve(__dirname,'src/js', 'participle.js'),
|
|
|
+ qaPage:path.resolve(__dirname,'src/js', 'qaPage.js'),
|
|
|
vendor: 'lodash'// 多个页面所需的公共库文件,防止重复打包带入
|
|
|
},
|
|
|
output: {
|
|
@@ -25,7 +26,7 @@ module.exports = {
|
|
|
},
|
|
|
plugins: [// 多入口的html文件用chunks这个参数来区分
|
|
|
new HtmlWebpackPlugin({
|
|
|
- title: 'knowledgeGraph',
|
|
|
+ title: '医学知识图谱',
|
|
|
template: path.resolve(__dirname, 'src/html', 'knowledgeGraph.html'),
|
|
|
filename: 'knowledgeGraph.html',
|
|
|
chunks: ['index', 'vendor', 'common'],
|
|
@@ -38,7 +39,7 @@ module.exports = {
|
|
|
}
|
|
|
}),
|
|
|
new HtmlWebpackPlugin({
|
|
|
- title: 'knowledgeTree',
|
|
|
+ title: '描述框架',
|
|
|
template: path.resolve(__dirname, 'src/html', 'knowledgeTree.html'),
|
|
|
filename: 'knowledgeTree.html',
|
|
|
chunks: ['knowledgeTree', 'vendor', 'common'],
|
|
@@ -51,7 +52,7 @@ module.exports = {
|
|
|
}
|
|
|
}),
|
|
|
new HtmlWebpackPlugin({
|
|
|
- title: 'participle',
|
|
|
+ title: '电子病历信息抽取',
|
|
|
template: path.resolve(__dirname, 'src/html', 'participle.html'),
|
|
|
filename: 'participle.html',
|
|
|
chunks: ['participle', 'vendor', 'common'],
|
|
@@ -62,7 +63,19 @@ module.exports = {
|
|
|
removeComments: true, //移除HTML中的注释
|
|
|
collapseWhitespace: true //删除空白符与换行符
|
|
|
}
|
|
|
- }),
|
|
|
+ }),new HtmlWebpackPlugin({
|
|
|
+ title: '智能问答',
|
|
|
+ template: path.resolve(__dirname, 'src/html', 'qaPage.html'),
|
|
|
+ filename: 'qaPage.html',
|
|
|
+ chunks: ['qaPage', 'vendor', 'common'],
|
|
|
+ inject: true,
|
|
|
+ hash: true, //防止缓存
|
|
|
+ minify: {
|
|
|
+ removeAttributeQuotes: true, //压缩 去掉引号
|
|
|
+ removeComments: true, //移除HTML中的注释
|
|
|
+ collapseWhitespace: true //删除空白符与换行符
|
|
|
+ }
|
|
|
+ }),
|
|
|
new MiniCssExtractPlugin({
|
|
|
filename: 'css/[name].css',
|
|
|
chunkFilename: '[id].css'
|