File tree 1 file changed +5
-1
lines changed
packages/react-scripts/config
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -343,7 +343,11 @@ module.exports = function(webpackEnv) {
343
343
strictExportPresence : true ,
344
344
rules : [
345
345
// Disable require.ensure as it's not a standard language feature.
346
- { parser : { requireEnsure : false } } ,
346
+ // Webpack 5 Change: We had to add a type to continue to remove requireEnsure since otherwise it thinks the Rule.type is json.
347
+ // This might be a Webpack 5 bug.
348
+ // See https://github.com/smelukov/webpack.js.org/blob/ceba5c77f7964e7982a1b666905924d89e4a2d4c/src/content/configuration/module.mdx#ruleparserparse
349
+ // See https://github.com/webpack/webpack/pull/10054
350
+ { type : 'javascript/auto' , parser : { requireEnsure : false } } ,
347
351
348
352
// First, run the linter.
349
353
// It's important to do this before Babel processes the JS.
You can’t perform that action at this time.
0 commit comments