第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

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

寫的htmlWebpackPlugin獲取它的options和files打包一直出錯

indexhtml:

<!DOCTYPE html>

<html>

????<head>

??? ????<meta charset="UTF-8">

????????<title><%= htmlWebpackPlugin.options.title %></title>

????</head>

????<body>

????????<%= htmlWebpackPlugin.options.date%>

????????<% for( var key in htmlWebpackPlugin){%><%= key%><%= }%>

????????<% for( var key in htmlWebpackPlugin.files){%><%= key%>:<%= JSON.stringify(htmlWebpackPlugin.files[key])%><%= }%>

????</body>



打包時候一直提示“ERROR in Template execution failed: TypeError: Cannot read property 'files' of undefined ”



打包后的index.html文件內(nèi)容:

Html Webpack Plugin:

<pre>

? TypeError: Cannot read property 'files' of undefined

??

? - index.html:91?

? ? /Users/carol/www/webpackDemo/index.html:91:43

??

? - index.html:104 module.exports

? ? /Users/carol/www/webpackDemo/index.html:104:3

??

? - index.js:264?

? ? [webpackDemo]/[html-webpack-plugin]/index.js:264:16

??

? - util.js:16 tryCatcher

? ? [webpackDemo]/[bluebird]/js/release/util.js:16:23

??

? - promise.js:512 Promise._settlePromiseFromHandler

? ? [webpackDemo]/[bluebird]/js/release/promise.js:512:31

??

? - promise.js:569 Promise._settlePromise

? ? [webpackDemo]/[bluebird]/js/release/promise.js:569:18

??

? - promise.js:606 Promise._settlePromiseCtx

? ? [webpackDemo]/[bluebird]/js/release/promise.js:606:10

??

? - async.js:138 Async._drainQueue

? ? [webpackDemo]/[bluebird]/js/release/async.js:138:12

??

? - async.js:143 Async._drainQueues

? ? [webpackDemo]/[bluebird]/js/release/async.js:143:10

??

? - async.js:17 Immediate.Async.drainQueues

? ? [webpackDemo]/[bluebird]/js/release/async.js:17:14

??

</pre>

在terminal中出現(xiàn)的錯誤提示:

Hash: f31b61d7e4a63d32cf9d

Version: webpack 3.6.0

Time: 590ms

?? ? ? ? ? ? ? ? ? ? ? ? ? ? Asset ? ? Size? Chunks ? ? ? ? ? ? Chunk Names

./js/main--aea7fcede5dd435d3e28.js? 2.51 kB ? ? ? 0? [emitted]? main

?? ./js/a--36facad12b17b00910bb.js? 2.52 kB ? ? ? 1? [emitted]? a

? ? ? ? ? ? ? ? ? ? ? ? index.html? 1.02 kB? ? ? ? ? [emitted] ?

?? [0] ./src/script/main.js 21 bytes {0} [built]

?? [1] ./src/script/a.js 22 bytes {1} [built]


ERROR in Template execution failed: TypeError: Cannot read property 'files' of undefined


ERROR in ? TypeError: Cannot read property 'files' of undefined

??

? - index.html:91?

? ? /Users/carol/www/webpackDemo/index.html:91:43

??

? - index.html:104 module.exports

? ? /Users/carol/www/webpackDemo/index.html:104:3

??

? - index.js:264?

? ? [webpackDemo]/[html-webpack-plugin]/index.js:264:16

??

? - util.js:16 tryCatcher

? ? [webpackDemo]/[bluebird]/js/release/util.js:16:23

??

? - promise.js:512 Promise._settlePromiseFromHandler

? ? [webpackDemo]/[bluebird]/js/release/promise.js:512:31

??

? - promise.js:569 Promise._settlePromise

? ? [webpackDemo]/[bluebird]/js/release/promise.js:569:18

??

? - promise.js:606 Promise._settlePromiseCtx

? ? [webpackDemo]/[bluebird]/js/release/promise.js:606:10

??

? - async.js:138 Async._drainQueue

? ? [webpackDemo]/[bluebird]/js/release/async.js:138:12

??

? - async.js:143 Async._drainQueues

? ? [webpackDemo]/[bluebird]/js/release/async.js:143:10

??

? - async.js:17 Immediate.Async.drainQueues

? ? [webpackDemo]/[bluebird]/js/release/async.js:17:14

??


Child html-webpack-plugin for "index.html":

?? ? 1 asset

?? ? ? [0] ./node_modules/html-webpack-plugin/lib/loader.js!./index.html 1.49 kB {0} [built]

?? ? ? [2] (webpack)/buildin/global.js 509 bytes {0} [built]

?? ? ? [3] (webpack)/buildin/module.js 517 bytes {0} [built]

? ? ? ? + 1 hidden module


正在回答

2 回答

<% for( var key in htmlWebpackPlugin){%><%= key%><%= }%>中最后的<%= }%>等號不要

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

打包后的index.html文件內(nèi)容:

Html Webpack Plugin:

<pre>

? TypeError: Cannot read property 'files' of undefined

??

? - index.html:91?

? ? /Users/carol/www/webpackDemo/index.html:91:43

??

? - index.html:104 module.exports

? ? /Users/carol/www/webpackDemo/index.html:104:3

??

? - index.js:264?

? ? [webpackDemo]/[html-webpack-plugin]/index.js:264:16

??

? - util.js:16 tryCatcher

? ? [webpackDemo]/[bluebird]/js/release/util.js:16:23

??

? - promise.js:512 Promise._settlePromiseFromHandler

? ? [webpackDemo]/[bluebird]/js/release/promise.js:512:31

??

? - promise.js:569 Promise._settlePromise

? ? [webpackDemo]/[bluebird]/js/release/promise.js:569:18

??

? - promise.js:606 Promise._settlePromiseCtx

? ? [webpackDemo]/[bluebird]/js/release/promise.js:606:10

??

? - async.js:138 Async._drainQueue

? ? [webpackDemo]/[bluebird]/js/release/async.js:138:12

??

? - async.js:143 Async._drainQueues

? ? [webpackDemo]/[bluebird]/js/release/async.js:143:10

??

? - async.js:17 Immediate.Async.drainQueues

? ? [webpackDemo]/[bluebird]/js/release/async.js:17:14

??

</pre>

在terminal中出現(xiàn)的錯誤提示:

Hash: f31b61d7e4a63d32cf9d

Version: webpack 3.6.0

Time: 590ms

?? ? ? ? ? ? ? ? ? ? ? ? ? ? Asset ? ? Size? Chunks ? ? ? ? ? ? Chunk Names

./js/main--aea7fcede5dd435d3e28.js? 2.51 kB ? ? ? 0? [emitted]? main

?? ./js/a--36facad12b17b00910bb.js? 2.52 kB ? ? ? 1? [emitted]? a

? ? ? ? ? ? ? ? ? ? ? ? index.html? 1.02 kB? ? ? ? ? [emitted] ?

?? [0] ./src/script/main.js 21 bytes {0} [built]

?? [1] ./src/script/a.js 22 bytes {1} [built]


ERROR in Template execution failed: TypeError: Cannot read property 'files' of undefined


ERROR in ? TypeError: Cannot read property 'files' of undefined

??

? - index.html:91?

? ? /Users/carol/www/webpackDemo/index.html:91:43

??

? - index.html:104 module.exports

? ? /Users/carol/www/webpackDemo/index.html:104:3

??

? - index.js:264?

? ? [webpackDemo]/[html-webpack-plugin]/index.js:264:16

??

? - util.js:16 tryCatcher

? ? [webpackDemo]/[bluebird]/js/release/util.js:16:23

??

? - promise.js:512 Promise._settlePromiseFromHandler

? ? [webpackDemo]/[bluebird]/js/release/promise.js:512:31

??

? - promise.js:569 Promise._settlePromise

? ? [webpackDemo]/[bluebird]/js/release/promise.js:569:18

??

? - promise.js:606 Promise._settlePromiseCtx

? ? [webpackDemo]/[bluebird]/js/release/promise.js:606:10

??

? - async.js:138 Async._drainQueue

? ? [webpackDemo]/[bluebird]/js/release/async.js:138:12

??

? - async.js:143 Async._drainQueues

? ? [webpackDemo]/[bluebird]/js/release/async.js:143:10

??

? - async.js:17 Immediate.Async.drainQueues

? ? [webpackDemo]/[bluebird]/js/release/async.js:17:14

??


Child html-webpack-plugin for "index.html":

?? ? 1 asset

?? ? ? [0] ./node_modules/html-webpack-plugin/lib/loader.js!./index.html 1.49 kB {0} [built]

?? ? ? [2] (webpack)/buildin/global.js 509 bytes {0} [built]

?? ? ? [3] (webpack)/buildin/module.js 517 bytes {0} [built]

? ? ? ? + 1 hidden module


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

w2458452805

跟你一樣的問題,請問解決了嗎?
2017-11-23 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

寫的htmlWebpackPlugin獲取它的options和files打包一直出錯

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

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網(wǎng)微信公眾號