{"name":"babel-plugin-react-native-web","version":"0.21.0","author":{"name":"Nicolas Gallagher"},"license":"MIT","_id":"babel-plugin-react-native-web@0.21.0","maintainers":[{"name":"necolas","email":"nicolasgallagher@gmail.com"}],"homepage":"https://github.com/necolas/react-native-web#readme","bugs":{"url":"https://github.com/necolas/react-native-web/issues"},"dist":{"shasum":"d95f0483e79afbe6086d4ec074b5775521ba2083","tarball":"http://registry-npm.ywwl.com/babel-plugin-react-native-web/download/babel-plugin-react-native-web-0.21.0.tgz","fileCount":8,"integrity":"sha512-9xzzNIQm/zHFNp8P45PtrPca1HMvIz0JeBnxqQ2YbLr8ltxP6ns+5x0q70LbRmnz4VhsglRDpnMguqIxUOzflg==","signatures":[{"sig":"MEYCIQD5H2yro1nJ3dcdnMf25JNw1NxGjlZd11wCtq15LZU0rwIhAIfGx1hi15cDybk1egtKrsXO7qbn9D0tKz3Rc3xSLAGD","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":17221,"size":4214,"noattachment":false,"key":"/babel-plugin-react-native-web/-/babel-plugin-react-native-web-0.21.0.tgz"},"main":"index.js","gitHead":"3c27decd16e1cc62736e33d4458372b42f186f42","_npmUser":{"name":"necolas","email":"nicolasgallagher@gmail.com"},"repository":{"url":"git://github.com/necolas/react-native-web.git","type":"git"},"_npmVersion":"10.9.2","description":"Babel plugin for React Native for Web","directories":{},"_nodeVersion":"22.14.0","publishConfig":{"registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"babel-plugin-tester":"^10.1.0"},"_npmOperationalInternal":{"tmp":"tmp/babel-plugin-react-native-web_0.21.0_1753473890224_0.3524987184215813","host":"s3://npm-registry-packages-npm-production"},"readme":"# babel-plugin-react-native-web\n\n[![npm version][package-badge]][package-url] [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://reactjs.org/docs/how-to-contribute.html#your-first-pull-request)\n\nA Babel plugin that will alias `react-native` to `react-native-web` and exclude\nany modules not required by your app (keeping bundle size down).\n\n## Installation\n\n```\nnpm install --save-dev babel-plugin-react-native-web\n```\n\n## Usage\n\n**.babelrc**\n\n```\n{\n  \"plugins\": [\n    [\"react-native-web\", { commonjs: true }]\n  ]\n}\n```\n\nYou should configure the plugin to match the module format used by your\nbundler. Most modern bundlers will use a package's ES modules by default (i.e.,\nif `package.json` has a `module` field). But if you need the plugin to rewrite\nimport paths to point to CommonJS modules, you must set the `commonjs` option\nto `true`.\n\n## Example\n\nNOTE: `react-native-web` internal paths are _not stable_ and you must not rely\non them. Always use the Babel plugin to optimize your build. What follows is an\nexample of the rewrite performed by the plugin.\n\n**Before**\n\n```js\nimport { StyleSheet, View } from 'react-native';\n```\n\n**After**\n\n```js\nimport StyleSheet from 'react-native-web/dist/exports/StyleSheet';\nimport View from 'react-native-web/dist/exports/View';\n```\n\n[package-badge]: https://img.shields.io/npm/v/babel-plugin-react-native-web.svg?style=flat\n[package-url]: https://www.npmjs.com/package/babel-plugin-react-native-web\n","publish_time":1753473890413,"_cnpm_publish_time":1753473890413,"dist-tags":{"latest":"0.21.4"}}