小编use*_*540的帖子

使用 Rollup 哈希文件名

我对捆绑程序相当陌生,rollup特别是。rollup.config.js在构建生产时有条件地散列文件名,同时保存index.html以引用新版本.css.js 散列版本的最佳方法是什么?

我在文档中看到了这一点,但我想我不知道如何根据dev/prod设置有条件地设置这些选项?

output: {
        sourcemap: true,
        format: 'iife',
        name: 'app',
        file: 'public/build/bundle.js'
       // entryFileNames : 'bundle[hash].js
    },
Run Code Online (Sandbox Code Playgroud)

或者正在使用rollup-plugin-hash更好的解决方案?仍然不确定更新的最佳实践是什么index.html (以及清单文件选项提供什么?)

hash rollupjs

5
推荐指数
1
解决办法
4045
查看次数

标签 统计

hash ×1

rollupjs ×1