Hacker News new | ask | show | jobs
by satvikpendem 1710 days ago
See also SWC, something similar to esbuild but written in Rust. NextJS uses SWC as well as Deno.

Rome is also being rewritten in Rust, it's more of a complete set of packages that subsume Webpack, Babel and all the other parts of the JS / TS development experience.

1 comments

The announcements from NextJS has been really confusing. I don't think they are using SWC yet. They are just working on it. The reason for the confusion is because they write about the progress in the release notes, making it look like they are using it.
SWC in NextJS is still in canary with experimental settings, but it took me 3 lines of code yesterday to make it work on a fairly large app ( https://labelflow.ai ). Hot reload times instantly went from 10s to 1s. Twitter discussion here https://twitter.com/vlecrubier/status/1448371633673187329?s=...

Overall I’m pretty bullish on Rust tooling and integration within the JS/ Wasm ecosystem !

could you provide a link on how to enable this experimental setting ? thank you.
https://github.com/swc-project/swc/discussions/2097#discussi...

- Run yarn add next@canary

- Add to your next.config.js:

    experimental: {
        swcMinify: true,
        swcLoader: true
    }
It's being using to bundle some parts of nextjs itself, but not quite ready to replace babel for users rn afaik
May be in next release we get swc in nextjs?