{"_id":"@react-native-swc/metro-plugin","_rev":"6-cd1571609ab57c7bdaae14bf7638587a","name":"@react-native-swc/metro-plugin","dist-tags":{"latest":"0.1.5"},"versions":{"0.1.0":{"name":"@react-native-swc/metro-plugin","version":"0.1.0","keywords":["bundler","metro","react-native","swc","transformer"],"author":{"name":"Joel Arvidsson"},"license":"MIT","_id":"@react-native-swc/metro-plugin@0.1.0","maintainers":[{"name":"oblador","email":"joel@oblador.se"}],"homepage":"https://github.com/oblador/react-native-swc#readme","bugs":{"url":"https://github.com/oblador/react-native-swc/issues"},"dist":{"shasum":"6fda110639c04b8992ba695dc67a6f25e47eadc1","tarball":"https://registry.npmjs.org/@react-native-swc/metro-plugin/-/metro-plugin-0.1.0.tgz","fileCount":4,"integrity":"sha512-lpJL08VBYupOHnGOLDT8z+SdrGZVe0SpoF68iYKjHoY5nhcjKi8qN/ZS1r5w6hYQpCzKlxgmQ5av3PynWfJMFQ==","signatures":[{"sig":"MEYCIQDt2ARcDqtNR7336MW1mZoXg3O4+4Bd8rrexof5hs1eTQIhAORbIpvIzAmszwO2lovmGCT99tuHL70IDVYii4r3Gl+e","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":888113},"main":"./metro_plugin.wasm","_from":"file:react-native-swc-metro-plugin-0.1.0.tgz","engines":{"node":">=18"},"exports":{".":"./metro_plugin.wasm","./package.json":"./package.json"},"scripts":{"test":"rstest run","build":"pnpm build:wasm","clean":"rm -f metro_plugin.wasm","typecheck":"tsgo --noEmit","build:wasm":"cargo build --target wasm32-wasip1 --release --manifest-path crates/metro_plugin/Cargo.toml && cp ../../target/wasm32-wasip1/release/metro_plugin.wasm ./metro_plugin.wasm"},"_npmUser":{"name":"oblador","email":"joel@oblador.se"},"_resolved":"/private/var/folders/4v/z0gc48qd7ps0n0d1_81x0jd40000gn/T/9b8a0ea53ffc03f8fe988be587ed393e/react-native-swc-metro-plugin-0.1.0.tgz","_integrity":"sha512-lpJL08VBYupOHnGOLDT8z+SdrGZVe0SpoF68iYKjHoY5nhcjKi8qN/ZS1r5w6hYQpCzKlxgmQ5av3PynWfJMFQ==","repository":{"url":"git+https://github.com/oblador/react-native-swc.git","type":"git","directory":"packages/metro-plugin"},"_npmVersion":"10.9.4","description":"SWC plugin ports of Metro's post-transform passes (inline, inline-requires, constant-folding, experimental-imports).","directories":{},"_nodeVersion":"22.22.0","_hasShrinkwrap":false,"devDependencies":{"@swc/core":"^1.15.30","@types/node":"^22.0.0","@rstest/core":"^0.9.9","@typescript/native-preview":"^7.0.0-dev.20260426.1"},"_npmOperationalInternal":{"tmp":"tmp/metro-plugin_0.1.0_1777234330185_0.653755762553285","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@react-native-swc/metro-plugin","version":"0.1.1","keywords":["bundler","metro","react-native","swc","transformer"],"author":{"name":"Joel Arvidsson"},"license":"MIT","_id":"@react-native-swc/metro-plugin@0.1.1","maintainers":[{"name":"oblador","email":"joel@oblador.se"}],"homepage":"https://github.com/oblador/react-native-swc#readme","bugs":{"url":"https://github.com/oblador/react-native-swc/issues"},"dist":{"shasum":"144136b4c14b29791b338737deaf1ba0a9762cca","tarball":"https://registry.npmjs.org/@react-native-swc/metro-plugin/-/metro-plugin-0.1.1.tgz","fileCount":4,"integrity":"sha512-ocjqILZLx9bg7d7A4IJ2qtdpTVF4tmtrHR35SVhLBOjV8C/m8F6zx+XE5PzfT1AgoRx7JjCB0cM6tD726Gk3/g==","signatures":[{"sig":"MEQCIDXgKZh9XS4hU+2ttMUOtXk/gGLTZLqjGPFBQQcmxwsUAiAaXSkNne5Xf6F6tzu9+AFXH+kTKwUWZUH1YuNsoUa7fw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@react-native-swc%2fmetro-plugin@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":887792},"main":"./metro_plugin.wasm","_from":"file:react-native-swc-metro-plugin-0.1.1.tgz","engines":{"node":">=18"},"exports":{".":"./metro_plugin.wasm","./package.json":"./package.json"},"scripts":{"test":"rstest run","build":"pnpm build:wasm","clean":"rm -f metro_plugin.wasm","typecheck":"tsgo --noEmit","build:wasm":"cargo build --target wasm32-wasip1 --release --manifest-path crates/metro_plugin/Cargo.toml && cp ../../target/wasm32-wasip1/release/metro_plugin.wasm ./metro_plugin.wasm"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:33e073fb-e5b5-41e1-9971-2ecdf9fc6246"}},"_resolved":"/tmp/7b81655cc62837abd3d8d8a559a9eb17/react-native-swc-metro-plugin-0.1.1.tgz","_integrity":"sha512-ocjqILZLx9bg7d7A4IJ2qtdpTVF4tmtrHR35SVhLBOjV8C/m8F6zx+XE5PzfT1AgoRx7JjCB0cM6tD726Gk3/g==","repository":{"url":"git+https://github.com/oblador/react-native-swc.git","type":"git","directory":"packages/metro-plugin"},"_npmVersion":"11.13.0","description":"SWC plugin ports of Metro's post-transform passes (inline, inline-requires, constant-folding, experimental-imports).","directories":{},"_nodeVersion":"25.9.0","_hasShrinkwrap":false,"devDependencies":{"@swc/core":"^1.15.32","@types/node":"^22.0.0","@rstest/core":"^0.9.9","@typescript/native-preview":"^7.0.0-dev.20260426.1"},"_npmOperationalInternal":{"tmp":"tmp/metro-plugin_0.1.1_1777320789693_0.13314287745244657","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@react-native-swc/metro-plugin","version":"0.1.2","keywords":["bundler","metro","react-native","swc","transformer"],"author":{"name":"Joel Arvidsson"},"license":"MIT","_id":"@react-native-swc/metro-plugin@0.1.2","maintainers":[{"name":"oblador","email":"joel@oblador.se"}],"homepage":"https://github.com/oblador/react-native-swc#readme","bugs":{"url":"https://github.com/oblador/react-native-swc/issues"},"dist":{"shasum":"6ed26c6a44303887f80319e68ffa8b379130ea26","tarball":"https://registry.npmjs.org/@react-native-swc/metro-plugin/-/metro-plugin-0.1.2.tgz","fileCount":4,"integrity":"sha512-NX5+G3e9nLrIxbWtOH0jD8KuTq1ddqaE3n7FmtJ9skWBIvzE/s8nO2BcGrc+C4EAUhzCXxRXOTiAEuBMURaJsg==","signatures":[{"sig":"MEUCIQCjkwUPfe5r7KcNMPUi70VRQ43BT4jHSg0jBAQLtsoBhgIgL/jIHgZB0uKGubmUk2qxV4d3kX2DWOe86k/E+Xljvlc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@react-native-swc%2fmetro-plugin@0.1.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":916299},"main":"./metro_plugin.wasm","_from":"file:react-native-swc-metro-plugin-0.1.2.tgz","engines":{"node":">=18"},"exports":{".":"./metro_plugin.wasm","./package.json":"./package.json"},"scripts":{"test":"rstest run","build":"pnpm build:wasm","clean":"rm -f metro_plugin.wasm","typecheck":"tsgo --noEmit","build:wasm":"cargo build --target wasm32-wasip1 --release --manifest-path crates/metro_plugin/Cargo.toml && cp ../../target/wasm32-wasip1/release/metro_plugin.wasm ./metro_plugin.wasm"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:33e073fb-e5b5-41e1-9971-2ecdf9fc6246"}},"_resolved":"/tmp/3dcad4df7c7a433779bdf3a1b667b226/react-native-swc-metro-plugin-0.1.2.tgz","_integrity":"sha512-NX5+G3e9nLrIxbWtOH0jD8KuTq1ddqaE3n7FmtJ9skWBIvzE/s8nO2BcGrc+C4EAUhzCXxRXOTiAEuBMURaJsg==","repository":{"url":"git+https://github.com/oblador/react-native-swc.git","type":"git","directory":"packages/metro-plugin"},"_npmVersion":"11.13.0","description":"SWC plugin ports of Metro's post-transform passes (inline, inline-requires, constant-folding, experimental-imports).","directories":{},"_nodeVersion":"25.9.0","_hasShrinkwrap":false,"devDependencies":{"@swc/core":"^1.15.32","@types/node":"^22.0.0","@rstest/core":"^0.9.9","@typescript/native-preview":"^7.0.0-dev.20260426.1"},"_npmOperationalInternal":{"tmp":"tmp/metro-plugin_0.1.2_1777704336576_0.7231283114569484","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@react-native-swc/metro-plugin","version":"0.1.3","keywords":["bundler","metro","react-native","swc","transformer"],"author":{"name":"Joel Arvidsson"},"license":"MIT","_id":"@react-native-swc/metro-plugin@0.1.3","maintainers":[{"name":"oblador","email":"joel@oblador.se"}],"homepage":"https://github.com/oblador/react-native-swc#readme","bugs":{"url":"https://github.com/oblador/react-native-swc/issues"},"dist":{"shasum":"52b7cae32f04cf81928a795129b5950903efb1fd","tarball":"https://registry.npmjs.org/@react-native-swc/metro-plugin/-/metro-plugin-0.1.3.tgz","fileCount":4,"integrity":"sha512-SVqZyg1UAbK52FjT6mzHkIDrTTyg/+I/bX8XcTJY0vobs9/uupn8lfMuDTREEuRa7srwyj0N1q4uHnncYn8IZw==","signatures":[{"sig":"MEQCIGhl4j6n1ZybPCw3VKNeLxe2VXMzsYfmDqVGA5etx+Y9AiBzN+htAyI4onOJMoUBjpN0I0H5S2FlcjMValBbZsaj8Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@react-native-swc%2fmetro-plugin@0.1.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":927066},"main":"./metro_plugin.wasm","_from":"file:react-native-swc-metro-plugin-0.1.3.tgz","engines":{"node":">=18"},"exports":{".":"./metro_plugin.wasm","./package.json":"./package.json"},"scripts":{"test":"rstest run","build":"pnpm build:wasm","clean":"rm -f metro_plugin.wasm","typecheck":"tsgo --noEmit","build:wasm":"cargo build --target wasm32-wasip1 --release --manifest-path crates/metro_plugin/Cargo.toml && cp ../../target/wasm32-wasip1/release/metro_plugin.wasm ./metro_plugin.wasm"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:33e073fb-e5b5-41e1-9971-2ecdf9fc6246"}},"_resolved":"/tmp/fae4ae59bc252a221be01187df80ce22/react-native-swc-metro-plugin-0.1.3.tgz","_integrity":"sha512-SVqZyg1UAbK52FjT6mzHkIDrTTyg/+I/bX8XcTJY0vobs9/uupn8lfMuDTREEuRa7srwyj0N1q4uHnncYn8IZw==","repository":{"url":"git+https://github.com/oblador/react-native-swc.git","type":"git","directory":"packages/metro-plugin"},"_npmVersion":"11.14.1","description":"SWC plugin ports of Metro's post-transform passes (inline, inline-requires, constant-folding, experimental-imports).","directories":{},"_nodeVersion":"25.9.0","_hasShrinkwrap":false,"devDependencies":{"@swc/core":"^1.15.32","@types/node":"^22.0.0","@rstest/core":"^0.9.9","@typescript/native-preview":"^7.0.0-dev.20260426.1"},"_npmOperationalInternal":{"tmp":"tmp/metro-plugin_0.1.3_1778424702144_0.004543697386587997","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@react-native-swc/metro-plugin","version":"0.1.4","keywords":["bundler","metro","react-native","swc","transformer"],"author":{"name":"Joel Arvidsson"},"license":"MIT","_id":"@react-native-swc/metro-plugin@0.1.4","maintainers":[{"name":"oblador","email":"joel@oblador.se"}],"homepage":"https://github.com/oblador/react-native-swc#readme","bugs":{"url":"https://github.com/oblador/react-native-swc/issues"},"dist":{"shasum":"179fe1e457314dcc9a714d4a38edc64628f881ca","tarball":"https://registry.npmjs.org/@react-native-swc/metro-plugin/-/metro-plugin-0.1.4.tgz","fileCount":4,"integrity":"sha512-e3Y2bOckBX7eH/Cx7CbcillkcR+gpb4Rg72MZINFDTkwRUqws/VR/31pfTifiJootKi4frL0xJLYKkFKyfA0rg==","signatures":[{"sig":"MEUCIQD6Pcjmrqejq6SrBFN+SF9HBo3IcBmc9qbwfypoFHsEEgIgLJxa9vU495rMoosmkc+2nJsy2RxSLMR7O6M2CyL8B5U=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@react-native-swc%2fmetro-plugin@0.1.4","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":927066},"main":"./metro_plugin.wasm","_from":"file:react-native-swc-metro-plugin-0.1.4.tgz","engines":{"node":">=18"},"exports":{".":"./metro_plugin.wasm","./package.json":"./package.json"},"scripts":{"test":"rstest run","build":"pnpm build:wasm","clean":"rm -f metro_plugin.wasm","typecheck":"tsgo --noEmit","build:wasm":"cargo build --target wasm32-wasip1 --release --manifest-path crates/metro_plugin/Cargo.toml && cp ../../target/wasm32-wasip1/release/metro_plugin.wasm ./metro_plugin.wasm"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:33e073fb-e5b5-41e1-9971-2ecdf9fc6246"}},"_resolved":"/tmp/0b99a8158f44a183f3ab4bbaa875b8a8/react-native-swc-metro-plugin-0.1.4.tgz","_integrity":"sha512-e3Y2bOckBX7eH/Cx7CbcillkcR+gpb4Rg72MZINFDTkwRUqws/VR/31pfTifiJootKi4frL0xJLYKkFKyfA0rg==","repository":{"url":"git+https://github.com/oblador/react-native-swc.git","type":"git","directory":"packages/metro-plugin"},"_npmVersion":"11.14.1","description":"SWC plugin ports of Metro's post-transform passes (inline, inline-requires, constant-folding, experimental-imports).","directories":{},"_nodeVersion":"25.9.0","_hasShrinkwrap":false,"devDependencies":{"@swc/core":"^1.15.32","@types/node":"^22.0.0","@rstest/core":"^0.9.9","@typescript/native-preview":"^7.0.0-dev.20260426.1"},"_npmOperationalInternal":{"tmp":"tmp/metro-plugin_0.1.4_1779044848130_0.6263434532764991","host":"s3://npm-registry-packages-npm-production"}},"0.1.5":{"name":"@react-native-swc/metro-plugin","version":"0.1.5","description":"SWC plugin ports of Metro's post-transform passes (inline, inline-requires, constant-folding, experimental-imports).","keywords":["bundler","metro","react-native","swc","transformer"],"homepage":"https://github.com/oblador/react-native-swc#readme","bugs":{"url":"https://github.com/oblador/react-native-swc/issues"},"license":"MIT","author":{"name":"Joel Arvidsson"},"repository":{"type":"git","url":"git+https://github.com/oblador/react-native-swc.git","directory":"packages/metro-plugin"},"main":"./metro_plugin.wasm","exports":{".":"./metro_plugin.wasm","./package.json":"./package.json"},"devDependencies":{"@rstest/core":"^0.9.9","@swc/core":"^1.15.32","@types/node":"^22.0.0","@typescript/native-preview":"^7.0.0-dev.20260426.1"},"engines":{"node":">=18"},"scripts":{"build":"pnpm build:wasm","build:wasm":"cargo build --target wasm32-wasip1 --release --manifest-path crates/metro_plugin/Cargo.toml && cp ../../target/wasm32-wasip1/release/metro_plugin.wasm ./metro_plugin.wasm","clean":"rm -f metro_plugin.wasm","test":"rstest run","typecheck":"tsgo --noEmit"},"_id":"@react-native-swc/metro-plugin@0.1.5","_integrity":"sha512-GdptMVKlFeX61tj94MzINTxbbNU9Uhj26Fkgm9y9Nuem7RQtsSs9xNYDcO6Wfj1+PcZrSf0KXOV/+StUkYTI8g==","_resolved":"/tmp/96526fbb23aaf5e69660535e58c3204f/react-native-swc-metro-plugin-0.1.5.tgz","_from":"file:react-native-swc-metro-plugin-0.1.5.tgz","_nodeVersion":"25.9.0","_npmVersion":"11.16.0","dist":{"integrity":"sha512-GdptMVKlFeX61tj94MzINTxbbNU9Uhj26Fkgm9y9Nuem7RQtsSs9xNYDcO6Wfj1+PcZrSf0KXOV/+StUkYTI8g==","shasum":"19f414cbc8230681acfe9cd72dba784ce1abd042","tarball":"https://registry.npmjs.org/@react-native-swc/metro-plugin/-/metro-plugin-0.1.5.tgz","fileCount":4,"unpackedSize":955564,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@react-native-swc%2fmetro-plugin@0.1.5","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGwyDwkrUo4UptWCQMexU9DW/0WhKnneHXkODmaTevcLAiBy0kNVjFU0PVtWSDEN3Pb0tZqkRb6lQh1EsIDYV7QxHA=="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:33e073fb-e5b5-41e1-9971-2ecdf9fc6246"}},"directories":{},"maintainers":[{"name":"oblador","email":"joel@oblador.se"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/metro-plugin_0.1.5_1780248085976_0.5934740228918796"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-26T20:12:10.101Z","modified":"2026-05-31T17:21:26.524Z","0.1.0":"2026-04-26T20:12:10.435Z","0.1.1":"2026-04-27T20:13:09.885Z","0.1.2":"2026-05-02T06:45:36.781Z","0.1.3":"2026-05-10T14:51:42.433Z","0.1.4":"2026-05-17T19:07:28.308Z","0.1.5":"2026-05-31T17:21:26.173Z"},"bugs":{"url":"https://github.com/oblador/react-native-swc/issues"},"author":{"name":"Joel Arvidsson"},"license":"MIT","homepage":"https://github.com/oblador/react-native-swc#readme","keywords":["bundler","metro","react-native","swc","transformer"],"repository":{"type":"git","url":"git+https://github.com/oblador/react-native-swc.git","directory":"packages/metro-plugin"},"description":"SWC plugin ports of Metro's post-transform passes (inline, inline-requires, constant-folding, experimental-imports).","maintainers":[{"name":"oblador","email":"joel@oblador.se"}],"readme":"# @react-native-swc/metro-plugin\n\nSWC WASM plugin that implements Metro's post-transform passes:\n\n| Pass                  | Purpose                                                                                                                            |\n| --------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |\n| `experimentalImports` | Rewrites ESM imports to CJS-shaped `var X = require(\"m\").X` so `inlineRequires` can recognise them.                                |\n| `inline`              | `Platform.OS`, `Platform.select({...})` substitution. (`__DEV__` / `process.env.NODE_ENV` are handled by SWC's optimizer globals.) |\n| `inlineRequires`      | Moves top-level `var X = require(\"m\")` aliases to each use site; supports `memoizeCalls` and JSX tag-name live reads.              |\n| `constantFolding`     | Folds `true && x`, `'ios' === 'android' ? a : b`, constant `if` branches.                                                          |\n\nEach pass is individually opt-in via options — production (via\n`react-native-swc`) turns them on together; tests flip one flag at a\ntime.\n\n## Install\n\n```sh\nyarn add -D @react-native-swc/metro-plugin\n```\n\nNormally you don't configure this package directly — [`react-native-swc`](../react-native-swc)\ndepends on it and wires it into Metro's SWC plugin pipeline automatically.\n\n## License\n\n[MIT](./LICENSE).\n","readmeFilename":"README.md"}