I have basic question about webpack 5 configuration since I have zero experience with it. I would like to create most simple Angular application that uses node.js module crypto-js and SHA256.
Before webpack 5 it was quite simple. You didn't have to worry about webpack, it was somewhere in behind.
In command prompt I did : ng new TestApp -> cd TestApp -> npm install crypto-js -> npm install --save @types/crypto-js -> write simple test code with imported SHA256 -> build it and -> it worked!
Now I get message:
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 }
I have to install this module and include this polyfill inside config file. The question is howto write most simple webpack.config.js, where to put it and what to include in it besides these lines?
BR