requirejs配置文件中有个urlArgs参数,webpack有类似的功能吗?


requirejs配置文件中有个urlArgs参数,用于增加请求js文件时的版本号,可以防止客户端对废弃旧文件的缓存问题。

那webpack有类似的功能吗?如何更新客户端对旧文件的缓存呢?

webpack requirejs

逆游的鱼oO 9 years, 4 months ago

output.filename


 The filename of the entry chunk as relative path inside the output.path directory.

[name] is replaced by the name of the chunk.
[hash] is replaced by the hash of the compilation.
[chunkhash] is replaced by the hash of the chunk.

这里 hash chunkhash 都可以用

萌萌天使酱 answered 9 years, 4 months ago

Your Answer