WebPack中的输出变量是什么意思。文件名:[name] [contenthash:8]?
我正在配置WebPacks输出,并且遇到了一些具有这种不寻常的示例 末尾添加了语法。
output: {
filename: '[name][fullHash:8].bundle.js',
chunkFilename: '[name][fullHash:8].bundle.js',
path: `${__dirname}/dist`,
publicPath: "/",
},
好的,现在您看到全哈之后的8点?它提供什么额外功能?我的第一个猜测是UTF-8 ???但这只是黑暗中的刺伤。
I'm configuring Webpacks output and i have run into some examples which have this unusual
syntax added on the end.
output: {
filename: '[name][fullHash:8].bundle.js',
chunkFilename: '[name][fullHash:8].bundle.js',
path: `${__dirname}/dist`,
publicPath: "/",
},
Ok now you see the :8's after fullhash? what extra feature does it provide? My first guess was UTF-8??? But that's just a stab in the dark.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
因此,从
因此,这样做可能意味着
[fullhash:8]
将产生长度8的哈希,我想我会建议反对,并且最好将其保留在默认情况下20(通过删除:8
)。So from a quick little search in the docs, I found this one section which talks about it
So going by that, it would probably mean that
[fullHash:8]
would produce a hash of length 8, which I suppose I would advice against, and would be better off to keep it at the default of 20 (by just removing the:8
).