Closed ywzhaiqi closed 6 years ago
执行 ykit pack -m 命令后,prd 目录没有 index.html
ykit pack -m
prd
index.html
尝试添加 html-webpack-plugin,结果错误:
html-webpack-plugin
Error: Cannot find module 'webpack/lib/node/NodeTemplatePlugin'
如果要给每个文件加上 hash,该怎么做?
给文件加上 hash 可以在 ykit.js 的 modifyWebpackConfig 中:
modifyWebpackConfig
baseConfig.output.prd.filename ='[name]@[chunkhash][ext]';
关于 html-webpack-plugin,目前发现有兼容性问题,目前如果需求是把带有 hash 的资源名打入 index.html 并生成在 prd 我可以看下这块怎么处理
执行
ykit pack -m
命令后,prd
目录没有index.html
尝试添加
html-webpack-plugin
,结果错误:如果要给每个文件加上 hash,该怎么做?