Skip to content

An open source design system that's fully customizable and agent ready

TypeScript

docs(build): README notes that its Babel config conflicts with next/font (#9439)

Cindy Zhangfcd705d368fd
diff --git a/.changeset/build-readme-next-font-babel.md b/.changeset/build-readme-next-font-babel.md
new file mode 100644
index 0000000000..9ebdb878cf
--- /dev/null
+++ b/.changeset/build-readme-next-font-babel.md
@@ -0,0 +1,7 @@
+---
+'@astryxdesign/build': patch
+---
+
+[docs] The Next.js setup in the README says that its Babel config turns off SWC, which `next/font` needs, so a fresh `create-next-app` layout must drop its `next/font` import before the webpack source build will compile.
+
+@cixzhang
diff --git a/packages/build/README.md b/packages/build/README.md
index 301e0df247..752061d5eb 100644
--- a/packages/build/README.md
+++ b/packages/build/README.md
@@ -93,6 +93,8 @@ module.exports = {
};
```
+A custom Babel config turns off Next.js's SWC compiler, and `next/font` needs SWC. Remove `next/font` from your layout (a fresh `create-next-app` layout imports `next/font/google`), or the build fails with `"next/font" requires SWC although Babel is being used`.
+
### 2. postcss.config.js
```js