gpt4 book ai didi

javascript - webpack watch 实例之间的缓存

转载 作者:数据小太阳 更新时间:2023-10-29 03:57:50 24 4
gpt4 key购买 nike

谁有实例之间共享 webpack 缓存选项的例子?在Webpack's docs它说:

You can pass an object to enable it and let webpack use the passed object as cache. This way you can share the cache object between multiple compiler calls. Note: Don’t share the cache between calls with different options.

但是具体实现还不清楚。有什么帮助吗?谢谢

最佳答案

您可以传入一个空对象。如果您将同一个对象传递给另一个实例,它们将共享相同的缓存。

// Webpack.config.js
var cacheObj = {};

module.exports = {
cache: cacheObj
}

关于javascript - webpack watch 实例之间的缓存,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28709161/

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