File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
packages/react-scripts/config Expand file tree Collapse file tree 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) {
343343 strictExportPresence : true ,
344344 rules : [
345345 // 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 } } ,
347351
348352 // First, run the linter.
349353 // It's important to do this before Babel processes the JS.
You can’t perform that action at this time.
0 commit comments