gpt4 book ai didi

javascript - HashedModuleIdsPlugin 有什么作用?

转载 作者:行者123 更新时间:2023-11-30 06:12:44 24 4
gpt4 key购买 nike

HashedModuleIdsPlugin 有什么作用?


来自 Webpack docs :

This plugin will cause hashes to be based on the relative path of the module, generating a four character string as the module id. Suggested for use in production.

读了几遍之后,我仍然无法理解为什么以及何时使用它,以及它与我在 output 部分为每个包定义名称的方式有何关系:

filename: '[contenthash].[name].js',

最佳答案

我是这样理解的,webpack 4.3加入了contenthash,但是在此之前,你可以使用HashedModuleIdsPlugin,我不太确定。

https://github.com/webpack/webpack/releases/tag/v4.3.0

关于javascript - HashedModuleIdsPlugin 有什么作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57936350/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com