I'm using crypto-js in angular 11 but as when I update the webpack this annoying warning has appeared and I don't know how and where(path) I can solve it !!! the error is :
./node_modules/crypto-js/core.js:43:22-39 - Warning: Module not found: Error: Can't resolve 'crypto' in 'D:\node_modules\crypto-js'
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 }
Warning: D:\cryptoJs.service.ts depends on 'crypto-js'. CommonJS or AMD dependencies can cause optimization bailouts.
i even installed crypto-browserify but not solved yet. how to be handled?