Skip to content

Resolving core modules in webpack 5 #11782

Answered by wisammechano
wisammechano asked this question in Q&A
Discussion options

You must be logged in to vote

Found the solution here. You have to use craco to extend webpack config.

// craco.config.js
module.exports = {
  webpack: {
    configure: {
      resolve: {
        fallback: {
          path: require.resolve("path-browserify"),
          crypto: require.resolve("crypto-browserify"),
          stream: require.resolve("stream-browserify"),
        },
      },
    },
  },
};

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@skysantoroa
Comment options

Answer selected by wisammechano
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants