Hacker News new | ask | show | jobs
by o_m 1710 days ago
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.
3 comments

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?