qq_木头人春天_0
2017-03-21 00:01

下面附有webpack.config.js代码,大牛帮忙看下哪里有问题
var htmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
entry: {
main: "./src/script/main.js",
a: "./src/script/a.js",
b: "./src/script/b.js",
c: "./src/script/c.js"
},
output: {
path: './dist',
filename: 'js/[name]-[chunkhash].js',
publicPath:'http://cdn.com/'
},
plugins:[
new htmlWebpackPlugin({
filename:'a.html',
template:'index.html',
title:'this is a!',
inject:'body',
chunks:['main','a']
}),
new htmlWebpackPlugin({
filename:'b.html',
template:'index.html',
title:'this is b!',
inject:'body',
chunks:['b']
}),
new htmlWebpackPlugin({
filename:'c.html',
template:'index.html',
title:'this is c!',
inject:'body',
chunks:['c']
})
]
}
是否是你的webpack安装的问题
webpack深入与实战
86553 学习 · 750 问题
相似问题