Closed kintz09 closed 1 year ago
Ah, just came across a comment that gave me a great hint! For anyone else looking for a quick fix for the CRA5 polyfill issue, check out the CRACO config file below:
module.exports={
webpack: {
configure: {
resolve: {
fallback: {
// Webpack 5, used in react-script v5, dropped support for built in node polyfills.
// CRACO is being used to add these polyfills back into the webpack config until they are not needed.
crypto: require.resolve("crypto-browserify"),
stream: require.resolve("stream-browserify"),
}
}
},
},
};
If this is wrong, please let me know.
Looks like this is resolved so I'll close this issue.
I was so excited to see a release candidate of CRACO with support for Create React App 5 and Webpack 5 has been released. Thank you so much to everyone who supported this important effort!
Now that it's released, could anyone provide some guidance on the proper way to add in the polyfills that were removed in Webpack?
There's two polyfills I'm trying to add: