|
|
import webpack, {DefinePlugin} from 'webpack';
|
|
|
import merge from 'webpack-merge';
|
|
|
import baseConfig from '../../webpack.public.config';
|
|
|
import HtmlWebpackPlugin from 'html-webpack-plugin';
|
|
|
import config from './src/config';
|
|
|
|
|
|
export default merge(baseConfig, {
|
|
|
//项目入口js文件
|
|
|
entry: ['./app/guoChao/src/index.js'],
|
|
|
devServer:{
|
|
|
publicPath: config.routerPath
|
|
|
},
|
|
|
plugins: [
|
|
|
// new HtmlWebpackPlugin({
|
|
|
// filename: 'index.html',
|
|
|
// template: './app/guoChao/index.html',
|
|
|
// }),
|
|
|
new HtmlWebpackPlugin({
|
|
|
filename: 'top40.html',
|
|
|
template: './app/guoChao/index.ejs',
|
|
|
title:"中西碰撞 潮流无界",
|
|
|
inject: true,
|
|
|
minify: {
|
|
|
removeComments: true,
|
|
|
collapseWhitespace: true,
|
|
|
removeAttributeQuotes: true
|
|
|
}
|
|
|
}),
|
|
|
new HtmlWebpackPlugin({
|
|
|
filename: 'guochao.html',
|
|
|
template: './app/guoChao/index.ejs',
|
|
|
title:"中西碰撞 潮流无界",
|
|
|
inject: true,
|
|
|
minify: {
|
|
|
removeComments: true,
|
|
|
collapseWhitespace: true,
|
|
|
removeAttributeQuotes: true
|
|
|
}
|
|
|
}),
|
|
|
]
|
|
|
}); |