-
Notifications
You must be signed in to change notification settings - Fork 334
Description
The problem
Next.js server action is broken when you used a .babelrc
file, see vercel/next.js#57966
How to reproduce
Steps to reproduce:
- Add NextJS (14.0.4)
- Add a async server action / mutation
npm build
will fail,npm dev
will intermittently failed
Expected behavior
I was expecting stylex to work out of the box with next.js app router, but adding it to an existing project was basically impossible.
Note
Ideally adding stylex to next.js would not require a babelrc file, as the frameworks now uses swc as its default compiler, and adding a babelrc file will default to previous compiler and lead to inconsistent result
From an engineer experience, it would be nice to just add @stylexjs/nextjs-plugin
, export my next.config with stylexPlugin
and have dev / production build working out of the box.
I understand the project is in its infancy, appreciate the great work y'all been doing 🚀