亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

為什么在webpack.config.js里plugin的里面,chunks這個會報錯

為什么在webpack.config.js里plugin的里面,chunks這個會報錯

正在回答

12 回答

代碼: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'
??? },//打包的入口 /*['./src/script/main.js','./src/script/a.js'],*/
??? output: {
??????? path: './dist',// 路徑
??????? filename: 'js/[name]-[chunkhash].js',//打包以后的文件名??? [name]-[chunkhash] [name]-[hash]
??????? publicPath: 'https:abc.com'
??? },
??? plugins:[
??????? new htmlWebpackPlugin({
??????????? filename: 'a.html',
??????????? template: 'index.html',
??????????? inject: 'body',
??????????? title: 'this is a.html',
??????????? chunks: ['a','main']
??????? }),

??????? new htmlWebpackPlugin({
??????????? filename: 'b.html',
??????????? template: 'index.html',
??????????? inject: 'body',
??????????? title: 'this is b.html',
??????????? chunks: ['b']
??????? }),

??????? new htmlWebpackPlugin({
??????????? filename: 'c.html',
??????????? template: 'index.html',
??????????? inject: 'body',
??????????? title: 'this is c.html',
??????????? chunks: ['c']
??????? })
??? ]
}

錯誤:

58af86b80001185105000651.jpg

58af86b9000165bb05000375.jpg


0 回復 有任何疑惑可以回復我~
#1

晚安里久違的夢鄉

我也是,怎么處理?
2017-09-10 回復 有任何疑惑可以回復我~

什么錯誤啊。。

0 回復 有任何疑惑可以回復我~
首頁上一頁12下一頁尾頁

舉報

0/150
提交
取消

為什么在webpack.config.js里plugin的里面,chunks這個會報錯

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號