发现这样插入才行compilation.assets[htmlWebpackPlugin.files.chunks.a.entry.substr(htmlWebpackPlugin.files.publicPath.length).split('?')[0]]._value
注意:
1.去除参数,当htmlWebpackPlugin中配置了hash参数,需去除'?hash值'该段字符串,只剩下相对路径/文件名 relativeStr.split('?')[0] //等同于compilation.assets['js/a.js']
2.source方法报错,直接调用_value读取源码
注意:
1.去除参数,当htmlWebpackPlugin中配置了hash参数,需去除'?hash值'该段字符串,只剩下相对路径/文件名 relativeStr.split('?')[0] //等同于compilation.assets['js/a.js']
2.source方法报错,直接调用_value读取源码
2018-04-18
compilation.assets[htmlWebpackPlugin.files.chunks.a.entry.substr(htmlWebpackPlugin.files.publicPath.length).split('?')[0]]._value
2018-04-18
atom : 无法将“atom”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确
,然后再试一次。
所在位置 行:1 字符: 1
+ atom ./
+ ~~~~
+ CategoryInfo : ObjectNotFound: (atom:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
,然后再试一次。
所在位置 行:1 字符: 1
+ atom ./
+ ~~~~
+ CategoryInfo : ObjectNotFound: (atom:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
2018-04-17
webpack版本已经到了4.X,所以这教程内容有很多版本问题,踩到坑的同学可以参考下面的文章:
https://blog.csdn.net/u012443286/article/details/79504289
https://blog.csdn.net/u012443286/article/details/79504289
2018-04-12
最赞回答 / __狂奔的蜗牛
https://www.npmjs.com/package/image-webpack-loader
options: { bypassOnDebug: true, // webpack@1.x disable: true, // webpack@2.x and newer },disable:true
2018-04-11
安装完html-webpack-plugin后,设置完配置文件,报错
G:\myProject\webpack-test1\node_modules\html-webpack-plugin\index.js:331
.then(([size, source]) => {
^
G:\myProject\webpack-test1\node_modules\html-webpack-plugin\index.js:331
.then(([size, source]) => {
^
2018-04-11
npm install webpack@1.13.2 -g
还是跟着老师的版本来回比较好点,用其他版本老师报错~~~~
还是跟着老师的版本来回比较好点,用其他版本老师报错~~~~
2018-04-11