求解决 大神带

来源:3-3 自动化生成项目中的html页面(下)

慕粉1716228404

2017-07-13 15:41

为什么我在前面那就多页面应用的时候报 entry undefined的错误    然后a.html是好的 b和c这边就是有报错

写回答 关注

5回答

  • 啊猿
    2020-01-25 09:17:07

    body和head里面都不能引用script src="<%= htmlWebpackPlugin.files.chunks.main.entry %>"></script>为什么啊

  • 一脚一个榴莲
    2017-07-31 11:46:56

    有注释其实是可以的,但不能有script src="<%= htmlWebpackPlugin.files.chunks.main.entry %>"></script>这种固定的引用,把这个删除就好了

  • 慕婉清2860215
    2017-07-20 14:23:28

    这个错 是什么鬼

  • 慕粉1716228404
    2017-07-13 16:30:03

    问题好像已经解决,index页面中好像在body中有注释就不行,把注释删掉就行了


  • 慕粉1716228404
    2017-07-13 15:42:36

    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


webpack深入与实战

webpack实战教程,用真实项目带你探索 webpack 强大的功能

86561 学习 · 721 问题

查看课程

相似问题