{"name":"babel-preset-expo","version":"13.0.0-canary-20250320-7a205d3","keywords":["babel","babel-preset","expo","expo-web","react-native","react-native-web","metro","webpack"],"author":{"name":"Expo","email":"support@expo.dev"},"license":"MIT","_id":"babel-preset-expo@13.0.0-canary-20250320-7a205d3","maintainers":[{"name":"tsapeta","email":"npm@tsapeta.com"},{"name":"ide","email":"ide+npm@jameside.com"},{"name":"lukmccall","email":"kosmatylukasz@gmail.com"},{"name":"szdziedzic","email":"szymon.dziedzic@swmansion.com"},{"name":"pkham","email":"piotrek.szeremeta@swmansion.com"},{"name":"radoslawkrzemien","email":"radoslaw.krzemien@swmansion.com"},{"name":"fiber-god","email":"datwheat@gmail.com"},{"name":"betoatexpo","email":"beto@expo.io"},{"name":"brentvatne","email":"brentvatne@gmail.com"},{"name":"evanbacon","email":"baconbrix@gmail.com"},{"name":"quinlanj","email":"quinlanjung@gmail.com"},{"name":"expoadmin","email":"support@expo.io"},{"name":"exponent","email":"exponent.team@gmail.com"},{"name":"wschurman","email":"wschurman@gmail.com"},{"name":"bycedric","email":"me@bycedric.com"},{"name":"jonsamp","email":"sampjon@gmail.com"},{"name":"princefleaswallow","email":"mhampton@hey.com"},{"name":"kudochien","email":"ckchien@gmail.com"},{"name":"keith-kurak","email":"keith@expo.io"},{"name":"alanhughes","email":"hughesno1@gmail.com"},{"name":"simek","email":"gosimek@gmail.com"},{"name":"gabrieldonadel","email":"donadeldev@gmail.com"},{"name":"douglowder","email":"douglowder@mac.com"},{"name":"kadikraman","email":"hellokadi@gmail.com"},{"name":"aleqsio","email":"mikucki@gmail.com"},{"name":"expo-bot","email":"brent+expobotnpm@expo.io"},{"name":"philpl","email":"phil@kitten.sh"},{"name":"marklawlor","email":"mwlawlor@gmail.com"}],"homepage":"https://github.com/expo/expo/tree/main/packages/babel-preset-expo#readme","bugs":{"url":"https://github.com/expo/expo/issues"},"dist":{"shasum":"4aac4e5f29820e3571e482c90b889850c1279af5","tarball":"http://registry-npm.ywwl.com/babel-preset-expo/download/babel-preset-expo-13.0.0-canary-20250320-7a205d3.tgz","fileCount":33,"integrity":"sha512-XR48XfiVTGeaCyA3g1esAlH9o+ve3IhOgpKGCNEb+WTyJ0px5hA3M0wACrlyet3K0XjSuZJ/5NRhgC91KmrsPg==","signatures":[{"sig":"MEUCIQDPkJ9B7GxXgBpDe4KK8T67M325iVVy6E4DMxb73cIXjQIgK+bYjWX98HUIYb4xFv0phU8qsEzlc6ysvR6lfykrm70=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":126980,"size":30318,"noattachment":false,"key":"/babel-preset-expo/-/babel-preset-expo-13.0.0-canary-20250320-7a205d3.tgz"},"main":"build/index.js","_from":"file:babel-preset-expo-13.0.0-canary-20250320-7a205d3.tgz","types":"./build/index.d.ts","scripts":{"lint":"expo-module lint","test":"expo-module test","build":"expo-module build","clean":"expo-module clean","prepare":"expo-module prepare","expo-module":"expo-module","prepublishOnly":"expo-module prepublishOnly"},"_npmUser":{"name":"expo-bot","email":"brent+expobotnpm@expo.io"},"_resolved":"/home/runner/work/expo/expo/packages/babel-preset-expo/babel-preset-expo-13.0.0-canary-20250320-7a205d3.tgz","_integrity":"sha512-XR48XfiVTGeaCyA3g1esAlH9o+ve3IhOgpKGCNEb+WTyJ0px5hA3M0wACrlyet3K0XjSuZJ/5NRhgC91KmrsPg==","repository":{"url":"git+https://github.com/expo/expo.git","type":"git","directory":"packages/babel-preset-expo"},"_npmVersion":"10.9.2","description":"The Babel preset for Expo projects","directories":{},"_nodeVersion":"22.14.0","dependencies":{"debug":"^4.3.4","resolve-from":"^5.0.0","react-refresh":"^0.14.2","@babel/preset-react":"^7.22.15","@babel/preset-typescript":"^7.23.0","@react-native/babel-preset":"0.79.0-rc.2","@babel/helper-module-imports":"^7.25.9","babel-plugin-react-native-web":"~0.19.13","@babel/plugin-transform-runtime":"^7.24.7","@babel/plugin-proposal-decorators":"^7.12.9","babel-plugin-syntax-hermes-parser":"^0.25.1","babel-plugin-transform-flow-enums":"^0.0.2","@babel/plugin-transform-parameters":"^7.24.7","@babel/plugin-transform-private-methods":"^7.24.7","@babel/plugin-syntax-export-default-from":"^7.24.7","@babel/plugin-transform-flow-strip-types":"^7.25.2","@babel/plugin-transform-modules-commonjs":"^7.24.8","@babel/plugin-proposal-export-default-from":"^7.24.7","@babel/plugin-transform-object-rest-spread":"^7.24.7","@babel/plugin-transform-export-namespace-from":"^7.22.11","@babel/plugin-transform-private-property-in-object":"^7.24.7"},"eslintConfig":{"extends":"universe/node"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.2.1","@babel/core":"^7.20.0","@babel/types":"^7.9.0","@babel/traverse":"^7.9.0","expo-module-scripts":"4.0.5-canary-20250320-7a205d3","react-compiler-runtime":"^19.0.0-beta-8a03594-20241020","babel-plugin-react-compiler":"^19.0.0-beta-9ee70a1-20241017"},"peerDependencies":{"react-compiler-runtime":"^19.0.0-beta-8a03594-20241020","babel-plugin-react-compiler":"^19.0.0-beta-9ee70a1-20241017"},"peerDependenciesMeta":{"react-compiler-runtime":{"optional":true},"babel-plugin-react-compiler":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/babel-preset-expo_13.0.0-canary-20250320-7a205d3_1742485320709_0.07510254887500856","host":"s3://npm-registry-packages-npm-production"},"readme":"# babel-preset-expo\n\nThis preset extends the default React Native preset (`@react-native/babel-preset`) and adds support for tree shaking, bundle splitting, React Server Components, Hermes compilation, advanced dead-code elimination, reanimated, Expo DOM components, server-side rendering, and more...\n\nYou can use this preset in any React Native project as a drop-in replacement for `@react-native/babel-preset`.\n\nIf you have problems with the code in this repository, please file issues & bug reports\nat https://github.com/expo/expo.\n\n## Expo Bundler Spec Compliance\n\nA bundler must follow these requirements if they are to be considered spec compliant for use with a **universal React** (Expo) project.\n\n### Babel Loader\n\nThe Babel loading mechanism must include the following properties on its `caller`.\n\n#### platform\n\nA `platform` property denoting the target platform. If the `platform` is not defined, it will default to using `web` when the `bundler` is `webpack` -- this is temporary and will throw an error in the future.\n\n| Value     | Description             |\n| --------- | ----------------------- |\n| `ios`     | Runs on iOS devices     |\n| `android` | Runs on Android devices |\n| `web`     | Runs in web browsers    |\n\n#### bundler\n\nA `bundler` property denoting the name of the bundler that is being used to create the JavaScript bundle.\nIf the `bundler` is not defined, it will default to checking if a `babel-loader` is used, if so then `webpack` will be used, otherwise it will default to `metro`.\n\n| Value     | Description                      |\n| --------- | -------------------------------- |\n| `metro`   | Bundling with [Metro][metro]     |\n| `webpack` | Bundling with [Webpack][webpack] |\n\n[metro]: https://facebook.github.io/metro/\n[webpack]: https://webpack.js.org/\n\n## Options\n\n### `react-compiler`\n\nSettings to pass to `babel-plugin-react-compiler`. Set as `false` to disable the plugin. As of SDK 51, you must also enable `experiments.reactCompiler: true` in the `app.json`.\n\n```js\n[\n  'babel-preset-expo',\n  {\n    'react-compiler': {\n      sources: (filename) => {\n        // Match file names to include in the React Compiler.\n        return filename.includes('src/path/to/dir');\n      },\n    },\n  },\n];\n```\n\n### `minifyTypeofWindow`\n\nSet `minifyTypeofWindow: true` to transform `typeof window` checks in your code, e.g. `if (typeof window === 'object')` -> `if (true)` in clients. This is useful when you're using libraries that mock the window object on native or in the server.\n\n```js\n[\n  'babel-preset-expo',\n  {\n    // If your native app doesn't polyfill `window` then setting this to `false` can reduce bundle size.\n    native: {\n      minifyTypeofWindow: true,\n    },\n  },\n];\n```\n\nDefaults to `true` for server environments, and `false` for client environments to support legacy browser polyfills and web workers.\n\n### `reanimated`\n\n`boolean`, defaults to `true`. Set `reanimated: false` to disable adding the `react-native-reanimated/plugin` when `react-native-reanimated` is installed.\n\n### `worklets`\n\n`boolean`, `boolean`, defaults to `true`. Set `worklets: false` to disable adding the `react-native-worklets/plugin` when `react-native-worklets` is installed. Applies only when using standalone `react-native-worklets` or `react-native-reanimated 4`.\n\n### [`jsxRuntime`](https://babeljs.io/docs/en/babel-plugin-transform-react-jsx#runtime)\n\n`classic | automatic`, defaults to `automatic`\n\n- `automatic` automatically convert JSX to JS without the need to `import React from 'react'` in every file. Be sure to follow the rest of the [setup guide](https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html#how-to-upgrade-to-the-new-jsx-transform) after enabling this, otherwise ESLint and other tools will throw warnings.\n- `classic` does not automatically import anything, React must imported into every file that uses JSX syntax.\n\n```js\n[\n  'babel-preset-expo',\n  {\n    jsxRuntime: 'classic',\n  },\n];\n```\n\nThis property is passed down to [`@babel/plugin-transform-react-jsx`](https://babeljs.io/docs/en/babel-plugin-transform-react-jsx).\n\n### [`jsxImportSource`](https://babeljs.io/docs/en/babel-plugin-transform-react-jsx#importsource)\n\n`string`, defaults to `react`\n\nThis option allows specifying a custom import source for importing functions.\n\n```js\n[\n  'babel-preset-expo',\n  {\n    jsxRuntime: 'automatic',\n    jsxImportSource: 'react',\n  },\n];\n```\n\nThis property is passed down to [`@babel/plugin-transform-react-jsx`](https://babeljs.io/docs/en/babel-plugin-transform-react-jsx). This options does nothing when `jsxRuntime` is not set to `automatic`.\n\n### [`lazyImports`](https://babeljs.io/docs/en/babel-plugin-transform-modules-commonjs#lazy)\n\nChanges Babel's compiled `import` statements to be lazily evaluated when their imported bindings are used for the first time.\n\n_Note:_ this option has an effect only when the `disableImportExportTransform` option is set to `false`. On Android and iOS, `disableImportExportTransform` defaults to `false`, and on web it defaults to `true` to allow for tree shaking.\n\nThis can improve the initial load time of your app because evaluating dependencies up front is sometimes entirely un-necessary, particularly when the dependencies have no side effects.\n\nThe value of `lazyImports` has a few possible effects:\n\n- `null` - [@react-native/babel-preset](https://github.com/facebook/react-native/tree/main/packages/react-native-babel-preset) will handle it. (Learn more about it here: https://github.com/facebook/metro/commit/23e3503dde5f914f3e642ef214f508d0a699851d)\n- `false` - No lazy initialization of any imported module.\n- `true` - Lazy-init all imported modules except local imports (e.g., `./foo`), certain Expo packages that have side effects, and the two cases mentioned [here](https://babeljs.io/docs/en/babel-plugin-transform-modules-commonjs#lazy).\n- `Array<string>` - [babel-plugin-transform-modules-commonjs](https://babeljs.io/docs/en/babel-plugin-transform-modules-commonjs#lazy) will handle it.\n- `(string) => boolean` - [babel-plugin-transform-modules-commonjs](https://babeljs.io/docs/en/babel-plugin-transform-modules-commonjs#lazy) will handle it.\n\n  If you choose to do this, you can also access the list of Expo packages that have side effects by using `const lazyImportsBlacklist = require('babel-preset-expo/lazy-imports-blacklist');` which returns a `Set`.\n\n**default:** `null`\n\n```js\n[\n    'babel-preset-expo',\n    {\n        lazyImports: true\n    }\n],\n```\n\n### `disableImportExportTransform`\n\nPass `true` to disable the transform that converts import/export to `module.exports`. Avoid setting this property directly. If you're using Metro, set `experimentalImportSupport: true` instead to ensure the entire pipeline is configured correctly.\n\n```js\n// metro.config.js\n\nconfig.transformer.getTransformOptions = async () => ({\n  transform: {\n    // Setting this to `true` will automatically toggle `disableImportExportTransform` in `babel-preset-expo`.\n    experimentalImportSupport: true,\n  },\n});\n```\n\nIf `undefined` (default), this will be set automatically via `caller.supportsStaticESM` which is set by the bundler.\n\n```js\n[\n    'babel-preset-expo',\n    {\n        disableImportExportTransform: true\n    }\n],\n```\n\n### `unstable_transformProfile`\n\nChanges the engine preset in `@react-native/babel-preset` based on the JavaScript engine that is being targeted. In Expo SDK 50 and greater, this is automatically set based on the [`jsEngine`](https://docs.expo.dev/versions/latest/config/app/#jsengine) option in your `app.json`.\n\n### `transformImportMeta`\n\nEnable transform that converts `import.meta` to `globalThis.__ExpoImportMetaRegistry`. Defaults to `true`.\n\n> **Note:** If the JavaScript engine supports `import.meta` natively, this transformation may interfere with the native implementation.\n\n### `enableBabelRuntime`\n\nPassed to `@react-native/babel-preset`.\n\n## Platform-specific options\n\nAll options can be passed in the platform-specific objects `native` and `web` to provide different settings on different platforms. For example, if you'd like to only apply `disableImportExportTransform` on web, use the following:\n\n```js\n[\n  'babel-preset-expo',\n  {\n    // Default value:\n    disableImportExportTransform: false,\n\n    web: {\n      // Web-specific value:\n      disableImportExportTransform: true,\n    },\n  },\n];\n```\n\nPlatform-specific options have higher priority over top-level options.\n","publish_time":1742485320886,"_cnpm_publish_time":1742485320886,"dist-tags":{"canary":"58.0.0-canary-20260909-ea7a89a","canary-sdk-55":"55.0.9-canary-20260429-a5e59cf","canary-sdk-56":"56.0.14-canary-20260701-9100865","latest":"58.0.24","next":"58.0.15","sdk-50":"10.0.1","sdk-51":"11.0.6","sdk-52":"12.0.12","sdk-53":"13.2.5","sdk-54":"54.0.12","sdk-55":"55.0.25","sdk-56":"56.0.21","sdk-57":"57.0.17"}}