{"library":"react-native-hardwired-transpiler","title":"react-native-hardwired-transpiler","description":"A transpiler module for the react-native-hardwired ecosystem that transforms ES6+ JavaScript code into a format compatible with Hardwired's dynamic module loading in React Native. This package is part of the Hardwired library enabling runtime code transformation and execution. Version 0.10.1 is the current stable release. It is designed specifically for React Native environments and relies on Babel for transpilation. Differentiates from other transpilers by tight integration with Hardwired's dynamic loading system.","language":"javascript","status":"active","last_verified":"Fri May 01","install":{"commands":["npm install react-native-hardwired-transpiler"],"cli":null},"imports":["import { transpile } from 'react-native-hardwired-transpiler'","import HardwiredTranspiler from 'react-native-hardwired-transpiler'","import type { TranspilerOptions } from 'react-native-hardwired-transpiler'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import { transpile } from 'react-native-hardwired-transpiler';\nimport { HardwiredRegistry } from 'react-native-hardwired';\n\nconst code = `export default () => { return 'Hello from Hardwired!'; }`;\nconst options = { filename: 'dynamic.js', presets: ['@babel/preset-env'] };\n\ntranspile(code, options).then(result => {\n  HardwiredRegistry.register('dynamic', result.code);\n  const module = HardwiredRegistry.load('dynamic');\n  console.log(module.default()); // 'Hello from Hardwired!'\n}).catch(err => console.error(err));","lang":"typescript","description":"Shows how to transpile ES6 code and register it with Hardwired's dynamic module loader.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}