Open Hank-wood opened 6 years ago
http://localhost:8090/admin.html http://localhost:8090/web.html
webpack 想要的配置在生成首页中
exports.genHtmlPlugins = function () {
var baseWebpackConfig = require('./webpack.base.config');
var path = require('path')
var plugins = [];
Object.keys(baseWebpackConfig.entry).forEach(function (name) {
plugins.push(
new HtmlWebpackPlugin({
filename: isProd ? path.resolve(__dirname, `../dist/${name}/index.html`) : name + '.html',
template: 'index.tpl.html',
chunks: isProd ? ['manifest', 'vendor', `${name}-vendor`, name] : [name],
inject: true
}))
})
return plugins
}
开发模式 http://localhost:8090