Skip to content
Discussion options

You must be logged in to vote

This happens with CRA4 (which uses Webpack 4) and its an old known issue. One solution is to install and use Craco 6.4.5 in particular and then in craco.config.js add:

module.exports = {
  webpack: {
    configure: {
      module: {
        rules: [
          {
            type: 'javascript/auto',
            test: /\.mjs$/,
            include: /node_modules/,
          },
        ],
      },
    },
  },
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
Answer selected by zehawki
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant