我想在我的Gatsby项目中添加use-shopping-cart (https://useshoppingcart.com/)。 当我尝试使用它时,我会遇到这个错误:
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules
by default.
This is no longer the case. Verify if you need this module and configure a
polyfill for it.
If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "crypto":
require.resolve("crypto-browserify") }'
- install 'crypto-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "crypto": false }
我该如何将 crypto-browserify
添加到gatsby中?作为gatsby-config.js
内的插件?
谢谢!
crypto
而不是path
,但它起作用了!非常感谢! - Sanne Wintrén