ice
ice copied to clipboard
vite 模式下 hash: 'contenthash' 构建失败
背景:
- 配置如下,构建的时候会产生错误 Error: "[contenthash]" is not a valid placeholder in "output.entryFileNames" pattern.
vite: true,
hash: 'contenthash',
- 配置hash:true的时候构建正常
需求:
- 按照文档提示,是可以使用contenthash的嘛?
vite 模式下走的是 rollup 打包,默认情况下 hash 能力无法对齐 webpack,这个我们看下是否能够兼容处理
也遇到了这个问题,建议先修改一下文档,标注 vite 模式暂不支持 contenthash
@guoyunhe @yiescc 关注下这个 issue ,下个版本会给出默认提示