File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
packages/react-scripts/config Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -144,6 +144,12 @@ module.exports = function (webpackEnv) {
144
144
145
145
const shouldUseReactRefresh = env . raw . FAST_REFRESH ;
146
146
147
+ if ( env . raw . IMJS_URL_PREFIX === undefined ) {
148
+ env . stringified [
149
+ 'process.env'
150
+ ] . IMJS_URL_PREFIX = `(globalThis.IMJS_URL_PREFIX ? globalThis.IMJS_URL_PREFIX : "")` ;
151
+ }
152
+
147
153
// common function to get style loaders
148
154
const getStyleLoaders = ( cssOptions , preProcessor ) => {
149
155
const loaders = [
@@ -450,6 +456,9 @@ module.exports = function (webpackEnv) {
450
456
module : {
451
457
strictExportPresence : true ,
452
458
rules : [
459
+ // Disable require.ensure as it's not a standard language feature.
460
+ // Add support for magic comments in commonjs modules (i.e. webpackIgnore for dynamic imports)
461
+ { parser : { requireEnsure : false , commonjsMagicComments : true } } ,
453
462
// Handle node_modules packages that contain sourcemaps
454
463
shouldUseSourceMap && {
455
464
enforce : 'pre' ,
You can’t perform that action at this time.
0 commit comments