react-runner
react-runner copied to clipboard
react-runner-with-swc (Need to create a new branch)
- You can compile the code to ES5
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| playground | ❌ Failed (Inspect) | Jan 5, 2024 4:46pm | ||
| react-runner | ❌ Failed (Inspect) | Jan 5, 2024 4:46pm | ||
| react-runner-codemirror | ❌ Failed (Inspect) | Jan 5, 2024 4:46pm |
what's the motivation?
SWC can compile lower-level code to support more browsers.
This package supports modern browsers(ES6), don't think WASM has broader support, and we use sucrase instead of Babel for smaller bundle size, I believe SWC will bloat it a lot(although it's loaded separately), and sucrase is already fast enough and maybe faster than swc in this case because of runtime of WASM
This package supports modern browsers(ES6), don't think WASM has broader support, and we use
sucraseinstead of Babel for smaller bundle size, I believe SWC will bloat it a lot(although it's loaded separately), andsucraseis already fast enough and maybe faster than swc in this case because of runtime of WASM
My use case is as follows: I created a custom component on our low-code platform in the modern browser environment of the canvas editing mode. However, when the application is actually deployed, there is no code compilation process and instead it uses the previously compiled results.
This package supports modern browsers(ES6), don't think WASM has broader support, and we use
sucraseinstead of Babel for smaller bundle size, I believe SWC will bloat it a lot(although it's loaded separately), andsucraseis already fast enough and maybe faster than swc in this case because of runtime of WASMMy use case is as follows: I created a custom component on our low-code platform in the modern browser environment of the canvas editing mode. However, when the application is actually deployed, there is no code compilation process and instead it uses the previously compiled results.
It is indeed inappropriate to do so when running in a browser. Some popular grammar can be supported in SWC. .e.g: https://github.com/alangpierce/sucrase#unsupported-syntax