Skip to content

Commit 17f0ee9

Browse files
Hari KiranHari Kiran
authored andcommitted
Fix: Adjust Webpack config to handle dynamic dependencies
1 parent 8091e0c commit 17f0ee9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

craco.config.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ module.exports = {
55
...webpackConfig.resolve.fallback,
66
path: require.resolve("path-browserify"),
77
};
8+
9+
webpackConfig.module.rules.push({
10+
test: /\.js$/,
11+
parser: {
12+
requireEnsure: false, // Prevents Webpack from complaining about dynamic requires
13+
},
14+
});
815
return webpackConfig;
916
},
1017
},

0 commit comments

Comments
 (0)