Skip to content

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

TypeScript

build(deps): update Next.js examples to 16.3.6 (#6808)

Cindy Zhanga08120314795
diff --git a/apps/example-nextjs-source/README.md b/apps/example-nextjs-source/README.md
index 7b2c4776f1..41e2362b96 100644
--- a/apps/example-nextjs-source/README.md
+++ b/apps/example-nextjs-source/README.md
@@ -7,19 +7,9 @@ Reference application for compiling **@astryxdesign/core** from raw TypeScript +
> `dist` while PostCSS compiles the library from `source`, and the page renders unstyled
> without erroring.
>
-> This example pins Next 15, where webpack is still the default, so its plain
-> `next dev` / `next build` scripts are correct as they stand. **On Next 16 the default
-> flips to Turbopack**, and a source build has to name the bundler:
->
-> ```bash
-> next dev --webpack
-> next build --webpack
-> ```
->
-> (`--webpack` is a Next 16 flag; Next 15 does not accept it.) `withAstryx()` throws
-> under Turbopack rather than producing the unstyled build. If you would rather not pin
-> the bundler, take the pre-built approach in
-> [example-nextjs](../example-nextjs/) instead.
+> This example pins Next 16 and explicitly passes `--webpack` to `next dev` and
+> `next build`. Next 16 defaults to Turbopack, but this source build requires
+> webpack because `nextConfig.webpack` sets its source-resolution conditions.
## Why source build?
diff --git a/apps/example-nextjs-source/next-env.d.ts b/apps/example-nextjs-source/next-env.d.ts
index 588c55e81b..644e5801cd 100644
--- a/apps/example-nextjs-source/next-env.d.ts
+++ b/apps/example-nextjs-source/next-env.d.ts
@@ -1,7 +1,7 @@
-// Copyright (c) Meta Platforms, Inc. and affiliates.
-
/// <reference types="next" />
/// <reference types="next/image-types/global" />
+import './.next/types/routes.d.ts';
+import './.next/types/root-params.d.ts';
// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
diff --git a/apps/example-nextjs-source/package.json b/apps/example-nextjs-source/package.json
index 515ea5e05d..efbf59d3b0 100644
--- a/apps/example-nextjs-source/package.json
+++ b/apps/example-nextjs-source/package.json
@@ -3,15 +3,15 @@
"version": "0.0.1",
"private": true,
"scripts": {
- "dev": "next dev",
- "build": "next build",
+ "dev": "next dev --webpack",
+ "build": "next build --webpack",
"start": "next start"
},
"dependencies": {
"@stylexjs/stylex": "^0.19.0",
"@astryxdesign/core": "*",
"@astryxdesign/theme-neutral": "*",
- "next": "^15.5.21",
+ "next": "^16.3.6",
"react": "^19.2.7",
"react-dom": "^19.2.7"
},
diff --git a/apps/example-nextjs-source/tsconfig.json b/apps/example-nextjs-source/tsconfig.json
index d2bba220e4..b575f7dac7 100644
--- a/apps/example-nextjs-source/tsconfig.json
+++ b/apps/example-nextjs-source/tsconfig.json
@@ -15,7 +15,7 @@
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
- "jsx": "preserve",
+ "jsx": "react-jsx",
"incremental": true,
"plugins": [
{
@@ -32,7 +32,8 @@
"next-env.d.ts",
"**/*.ts",
"**/*.tsx",
- ".next/types/**/*.ts"
+ ".next/types/**/*.ts",
+ ".next/dev/types/**/*.ts"
],
"exclude": [
"node_modules"
diff --git a/apps/example-nextjs-stylex/next-env.d.ts b/apps/example-nextjs-stylex/next-env.d.ts
index 588c55e81b..644e5801cd 100644
--- a/apps/example-nextjs-stylex/next-env.d.ts
+++ b/apps/example-nextjs-stylex/next-env.d.ts
@@ -1,7 +1,7 @@
-// Copyright (c) Meta Platforms, Inc. and affiliates.
-
/// <reference types="next" />
/// <reference types="next/image-types/global" />
+import './.next/types/routes.d.ts';
+import './.next/types/root-params.d.ts';
// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
diff --git a/apps/example-nextjs-stylex/package.json b/apps/example-nextjs-stylex/package.json
index bb9f178eb1..d2b2a74037 100644
--- a/apps/example-nextjs-stylex/package.json
+++ b/apps/example-nextjs-stylex/package.json
@@ -11,7 +11,7 @@
"@stylexjs/stylex": "^0.19.0",
"@astryxdesign/core": "*",
"@astryxdesign/theme-neutral": "*",
- "next": "^15.5.21",
+ "next": "^16.3.6",
"react": "^19.2.7",
"react-dom": "^19.2.7"
},
diff --git a/apps/example-nextjs-stylex/tsconfig.json b/apps/example-nextjs-stylex/tsconfig.json
index d2bba220e4..b575f7dac7 100644
--- a/apps/example-nextjs-stylex/tsconfig.json
+++ b/apps/example-nextjs-stylex/tsconfig.json
@@ -15,7 +15,7 @@
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
- "jsx": "preserve",
+ "jsx": "react-jsx",
"incremental": true,
"plugins": [
{
@@ -32,7 +32,8 @@
"next-env.d.ts",
"**/*.ts",
"**/*.tsx",
- ".next/types/**/*.ts"
+ ".next/types/**/*.ts",
+ ".next/dev/types/**/*.ts"
],
"exclude": [
"node_modules"
diff --git a/apps/example-nextjs-tailwind/next-env.d.ts b/apps/example-nextjs-tailwind/next-env.d.ts
index 588c55e81b..644e5801cd 100644
--- a/apps/example-nextjs-tailwind/next-env.d.ts
+++ b/apps/example-nextjs-tailwind/next-env.d.ts
@@ -1,7 +1,7 @@
-// Copyright (c) Meta Platforms, Inc. and affiliates.
-
/// <reference types="next" />
/// <reference types="next/image-types/global" />
+import './.next/types/routes.d.ts';
+import './.next/types/root-params.d.ts';
// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
diff --git a/apps/example-nextjs-tailwind/package.json b/apps/example-nextjs-tailwind/package.json
index eff0e89a3b..4c8a3c150d 100644
--- a/apps/example-nextjs-tailwind/package.json
+++ b/apps/example-nextjs-tailwind/package.json
@@ -11,7 +11,7 @@
"dependencies": {
"@astryxdesign/core": "*",
"@astryxdesign/theme-neutral": "*",
- "next": "^15.5.21",
+ "next": "^16.3.6",
"react": "^19.2.7",
"react-dom": "^19.2.7"
},
diff --git a/apps/example-nextjs-tailwind/tsconfig.json b/apps/example-nextjs-tailwind/tsconfig.json
index fba2bf3794..dbb27bd10e 100644
--- a/apps/example-nextjs-tailwind/tsconfig.json
+++ b/apps/example-nextjs-tailwind/tsconfig.json
@@ -11,11 +11,11 @@
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
- "jsx": "preserve",
+ "jsx": "react-jsx",
"incremental": true,
"plugins": [{ "name": "next" }],
"paths": { "@/*": ["./src/*"] }
},
- "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
+ "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", ".next/dev/types/**/*.ts"],
"exclude": ["node_modules"]
}
diff --git a/apps/example-nextjs/next-env.d.ts b/apps/example-nextjs/next-env.d.ts
index 588c55e81b..644e5801cd 100644
--- a/apps/example-nextjs/next-env.d.ts
+++ b/apps/example-nextjs/next-env.d.ts
@@ -1,7 +1,7 @@
-// Copyright (c) Meta Platforms, Inc. and affiliates.
-
/// <reference types="next" />
/// <reference types="next/image-types/global" />
+import './.next/types/routes.d.ts';
+import './.next/types/root-params.d.ts';
// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
diff --git a/apps/example-nextjs/package.json b/apps/example-nextjs/package.json
index 1941317e4a..152027008b 100644
--- a/apps/example-nextjs/package.json
+++ b/apps/example-nextjs/package.json
@@ -11,7 +11,7 @@
"dependencies": {
"@astryxdesign/core": "*",
"@astryxdesign/theme-neutral": "*",
- "next": "^15.5.21",
+ "next": "^16.3.6",
"react": "^19.2.7",
"react-dom": "^19.2.7"
},
diff --git a/apps/example-nextjs/tsconfig.json b/apps/example-nextjs/tsconfig.json
index c1334095f8..61b9d358dc 100644
--- a/apps/example-nextjs/tsconfig.json
+++ b/apps/example-nextjs/tsconfig.json
@@ -11,7 +11,7 @@
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
- "jsx": "preserve",
+ "jsx": "react-jsx",
"incremental": true,
"plugins": [
{
@@ -22,6 +22,6 @@
"@/*": ["./src/*"]
}
},
- "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
+ "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", ".next/dev/types/**/*.ts"],
"exclude": ["node_modules"]
}