{"library":"sandpack-transpiler","title":"Sandpack Transpiler","description":"A highly optimized transpiler for JSX, CJS, and ESM, built for the Sandpack ecosystem and based on Sucrase. Version 0.3.2 (pre-stable) ships TypeScript types, requires Node >=16, and focuses on performance, claiming >1M lines/sec on benchmarks. It is designed specifically for in-browser transpilation in sandboxed environments, distinguishing itself from general-purpose transpilers like Babel, esbuild, and swc by targeting Sandpack's use cases with minimal overhead. Currently in active development with no stable release.","language":"javascript","status":"active","last_verified":"Fri May 01","install":{"commands":["npm install sandpack-transpiler"],"cli":null},"imports":["import { transpile } from 'sandpack-transpiler'","import { transpileWithSucrase } from 'sandpack-transpiler'","import SandpackTranspiler from 'sandpack-transpiler'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import { transpile } from 'sandpack-transpiler';\n\nconst code = `const x = 1;\nexport default x;`;\n\ntranspile(code, {\n  filePath: '/App.js',\n  preset: 'react',\n}).then((result) => {\n  console.log(result.code);\n  // Output: \"var x = 1; export default x;\"\n});","lang":"typescript","description":"Transpile a simple ESM module using the default React preset. The result is ESNext with JSX compiled.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}