diff options
author | Paul Frazee <pfrazee@gmail.com> | 2024-01-12 17:04:08 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-12 17:04:08 -0800 |
commit | b3b818671e2e71648bccc87fc7d27ab81cc68aeb (patch) | |
tree | b2c8ef601781025d4757abbd1992ea02224d6224 /patches/metro-transform-worker+0.80.4.patch | |
parent | 8cc1bd0c40c5eb6ba6ef7949d33f80d79d75f410 (diff) | |
download | voidsky-b3b818671e2e71648bccc87fc7d27ab81cc68aeb.tar.zst |
Bump react-native@0.73.2 (#2519)
* Bump react-native@0.73.2 * Remove old patch
Diffstat (limited to 'patches/metro-transform-worker+0.80.4.patch')
-rw-r--r-- | patches/metro-transform-worker+0.80.4.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/patches/metro-transform-worker+0.80.4.patch b/patches/metro-transform-worker+0.80.4.patch new file mode 100644 index 000000000..717b7c2d9 --- /dev/null +++ b/patches/metro-transform-worker+0.80.4.patch @@ -0,0 +1,41 @@ +diff --git a/node_modules/metro-transform-worker/src/index.js b/node_modules/metro-transform-worker/src/index.js +index 9f2e3d2..5222c8e 100644 +--- a/node_modules/metro-transform-worker/src/index.js ++++ b/node_modules/metro-transform-worker/src/index.js +@@ -189,6 +189,10 @@ async function transformJS(file, { config, options, projectRoot }) { + let dependencyMapName = ""; + let dependencies; + let wrappedAst; ++ const minify = ++ options.minify && ++ options.unstable_transformProfile !== "hermes-canary" && ++ options.unstable_transformProfile !== "hermes-stable"; + + // If the module to transform is a script (meaning that is not part of the + // dependency graph and it code will just be prepended to the bundle modules), +@@ -228,19 +232,20 @@ async function transformJS(file, { config, options, projectRoot }) { + if (config.unstable_disableModuleWrapping === true) { + wrappedAst = ast; + } else { ++ let moduleFactoryName; ++ if (options.dev && !minify) { ++ moduleFactoryName = file.filename; ++ } + ({ ast: wrappedAst } = JsFileWrapping.wrapModule( + ast, + importDefault, + importAll, + dependencyMapName, +- config.globalPrefix ++ config.globalPrefix, ++ moduleFactoryName + )); + } + } +- const minify = +- options.minify && +- options.unstable_transformProfile !== "hermes-canary" && +- options.unstable_transformProfile !== "hermes-stable"; + const reserved = []; + if (config.unstable_dependencyMapReservedName != null) { + reserved.push(config.unstable_dependencyMapReservedName); |