課程
/前端開(kāi)發(fā)
/前端工具
/webpack深入與實(shí)戰(zhàn)
為什么我在前面那就多頁(yè)面應(yīng)用的時(shí)候報(bào) entry undefined的錯(cuò)誤 ? ?然后a.html是好的 b和c這邊就是有報(bào)錯(cuò)
2017-07-13
源自:webpack深入與實(shí)戰(zhàn) 3-3
正在回答
body和head里面都不能引用script src="<%= htmlWebpackPlugin.files.chunks.main.entry %>"></script>,為什么啊
有注釋其實(shí)是可以的,但不能有script src="<%= htmlWebpackPlugin.files.chunks.main.entry %>"></script>這種固定的引用,把這個(gè)刪除就好了
這個(gè)錯(cuò) 是什么鬼
問(wèn)題好像已經(jīng)解決,index頁(yè)面中好像在body中有注釋就不行,把注釋刪掉就行了
ERROR in ./src/script/b.js
Module parse failed: E:\new\webpack-demo\src\script\b.js Unexpected characte
。' (1:7)
You may need an appropriate loader to handle this file type.
| console。log('haha');
ERROR in ./src/script/c.js
Module parse failed: E:\new\webpack-demo\src\script\c.js Unexpected characte
| console。log('zizi');
ERROR in Template execution failed: TypeError: Cannot read property 'entry'
ndefined
ERROR in ? TypeError: Cannot read property 'entry' of undefined
? - index.html:97
? ? E:/new/webpack-demo/index.html:97:43
? - index.html:100 module.exports
? ? E:/new/webpack-demo/index.html:100:3
? - index.js:264
? ? [webpack-demo]/[html-webpack-plugin]/index.js:264:16
? - util.js:16 tryCatcher
? ? [webpack-demo]/[bluebird]/js/release/util.js:16:23
? - promise.js:512 Promise._settlePromiseFromHandler
? ? [webpack-demo]/[bluebird]/js/release/promise.js:512:31
? - promise.js:569 Promise._settlePromise
? ? [webpack-demo]/[bluebird]/js/release/promise.js:569:18
? - promise.js:606 Promise._settlePromiseCtx
? ? [webpack-demo]/[bluebird]/js/release/promise.js:606:10
? - async.js:138 Async._drainQueue
? ? [webpack-demo]/[bluebird]/js/release/async.js:138:12
? - async.js:143 Async._drainQueues
? ? [webpack-demo]/[bluebird]/js/release/async.js:143:10
? - async.js:17 Immediate.Async.drainQueues
? ? [webpack-demo]/[bluebird]/js/release/async.js:17:14
舉報(bào)
webpack實(shí)戰(zhàn)教程,用真實(shí)項(xiàng)目帶你探索 webpack 強(qiáng)大的功能
1 回答求大神解答:安裝css-loader等報(bào)錯(cuò),如圖:
1 回答求大佬們幫解決一下 style-loader!css-loader
3 回答安裝babel-loader后,運(yùn)行出現(xiàn)錯(cuò)誤,求大神解答
1 回答引入css報(bào)錯(cuò),求大神指點(diǎn)
6 回答我的總是報(bào)錯(cuò)哦,求大神看看
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號(hào)-11 京公網(wǎng)安備11010802030151號(hào)
購(gòu)課補(bǔ)貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動(dòng)學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號(hào)
2020-01-25
body和head里面都不能引用script src="<%= htmlWebpackPlugin.files.chunks.main.entry %>"></script>,為什么啊
2017-07-31
有注釋其實(shí)是可以的,但不能有script src="<%= htmlWebpackPlugin.files.chunks.main.entry %>"></script>這種固定的引用,把這個(gè)刪除就好了
2017-07-20
這個(gè)錯(cuò) 是什么鬼
2017-07-13
問(wèn)題好像已經(jīng)解決,index頁(yè)面中好像在body中有注釋就不行,把注釋刪掉就行了
2017-07-13
ERROR in ./src/script/b.js
Module parse failed: E:\new\webpack-demo\src\script\b.js Unexpected characte
。' (1:7)
You may need an appropriate loader to handle this file type.
| console。log('haha');
ERROR in ./src/script/c.js
Module parse failed: E:\new\webpack-demo\src\script\c.js Unexpected characte
。' (1:7)
You may need an appropriate loader to handle this file type.
| console。log('zizi');
ERROR in Template execution failed: TypeError: Cannot read property 'entry'
ndefined
ERROR in ? TypeError: Cannot read property 'entry' of undefined
? - index.html:97
? ? E:/new/webpack-demo/index.html:97:43
? - index.html:100 module.exports
? ? E:/new/webpack-demo/index.html:100:3
? - index.js:264
? ? [webpack-demo]/[html-webpack-plugin]/index.js:264:16
? - util.js:16 tryCatcher
? ? [webpack-demo]/[bluebird]/js/release/util.js:16:23
? - promise.js:512 Promise._settlePromiseFromHandler
? ? [webpack-demo]/[bluebird]/js/release/promise.js:512:31
? - promise.js:569 Promise._settlePromise
? ? [webpack-demo]/[bluebird]/js/release/promise.js:569:18
? - promise.js:606 Promise._settlePromiseCtx
? ? [webpack-demo]/[bluebird]/js/release/promise.js:606:10
? - async.js:138 Async._drainQueue
? ? [webpack-demo]/[bluebird]/js/release/async.js:138:12
? - async.js:143 Async._drainQueues
? ? [webpack-demo]/[bluebird]/js/release/async.js:143:10
? - async.js:17 Immediate.Async.drainQueues
? ? [webpack-demo]/[bluebird]/js/release/async.js:17:14