Skip to content

Commit 0b67af9

Browse files
kckst8aruniverse
andauthored
Add support for magic comments in commonjs modules (#69)
Co-authored-by: Arun George <[email protected]>
1 parent 2cf298a commit 0b67af9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/react-scripts/config/webpack.config.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,8 @@ module.exports = function (webpackEnv) {
478478
strictExportPresence: true,
479479
rules: [
480480
// Disable require.ensure as it's not a standard language feature.
481-
{ parser: { requireEnsure: false } },
481+
// Add support for magic comments in commonjs modules (i.e. webpackIgnore for dynamic imports)
482+
{ parser: { requireEnsure: false, commonjsMagicComments: true} },
482483
{
483484
// iModel.js Changes
484485
// always use source-map-loader and use strip-assert-loader on production builds;

0 commit comments

Comments
 (0)