A Babel plugin (v0.2.0, stable) that resolves imports for react-native-electron, enabling React Native components to run in Electron. It remaps react-native imports to react-native-electron and optionally transforms to CommonJS. Needed when targeting Electron with React Native codebases. Rarely updated but fills a specific niche.
npm install babel-plugin-react-native-electronVerified import paths — ran on the pinned version, not inferred.
Add the plugin to your Babel config with the commonjs option.
Run 'yarn add react-native-electron' or 'npm install react-native-electron'.
Configure Webpack target: 'electron-renderer' and add node: { __dirname: false, __filename: false }.Add a CSS loader and file-loader/asset modules to your Webpack config.
N/A
Ensure babel-plugin-react-native-electron is in your plugins array (e.g., .babelrc or babel.config.js) and that Babel is running on the affected files.
Add @babel/preset-env or @babel/plugin-transform-modules-commonjs to your Babel config.
Set nodeIntegration: true and contextIsolation: false in the BrowserWindow options, or use preload scripts.
No dependency data recorded yet.