Skip to content

Commit 1c5b316

Browse files
Update Nuxt framework guide for Nuxt 4 (#2309)
This pull request updates the Nuxt installation guide to align with the changes introduced in Nuxt 4. The current instructions can lead to confusion and errors for users setting up a new Nuxt 4 project. ### What does this PR do? * Updates the file paths to reflect Nuxt 4's new `app` directory structure. (https://nuxt.com/docs/4.x/guide/directory-structure/app/assets) * Updates the `compatibilityDate` in the `nuxt.config.ts` example to a more recent value. --------- Co-authored-by: Jordan Pittman <jordan@cryptica.me>
1 parent b19f478 commit 1c5b316

File tree

1 file changed

+7
-7
lines changed
  • src/app/(docs)/docs/installation/framework-guides

1 file changed

+7
-7
lines changed

src/app/(docs)/docs/installation/framework-guides/nuxtjs.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ export let steps: Step[] = [
1717
title: "Create your project",
1818
body: (
1919
<p>
20-
Start by creating a new Nuxt project if you don’t have one set up already. The most common approach is to use
21-
the <a href="https://nuxt.com/docs/getting-started/installation">Nuxt Command Line Interface</a>.
20+
Start by creating a new Nuxt project if you don’t have one set up already. The most common approach is to use{" "}
21+
<a href="https://nuxt.com/docs/4.x/getting-started/installation#new-project">Create Nuxt</a>.
2222
</p>
2323
),
2424
code: {
2525
name: "Terminal",
2626
lang: "shell",
2727
code: shell`
28-
npx nuxi init my-project
28+
npm create nuxt my-project
2929
cd my-project
3030
`,
3131
},
@@ -60,7 +60,7 @@ export let steps: Step[] = [
6060
import tailwindcss from "@tailwindcss/vite";
6161
6262
export default defineNuxtConfig({
63-
compatibilityDate: "2024-11-01",
63+
compatibilityDate: "2025-07-15",
6464
devtools: { enabled: true },
6565
vite: {
6666
plugins: [
@@ -76,7 +76,7 @@ export let steps: Step[] = [
7676
title: "Import Tailwind CSS",
7777
body: (
7878
<p>
79-
Create an <code>./assets/css/main.css</code> file and add an <code>@import</code> that imports Tailwind CSS.
79+
Create an <code>./app/assets/css/main.css</code> file and add an <code>@import</code> that imports Tailwind CSS.
8080
</p>
8181
),
8282
code: {
@@ -91,7 +91,7 @@ export let steps: Step[] = [
9191
title: "Add the CSS file globally",
9292
body: (
9393
<p>
94-
Add your newly-created <code>./assets/css/main.css</code> to the <code>css</code> array in your{" "}
94+
Add your newly-created <code>./app/assets/css/main.css</code> to the <code>css</code> array in your{" "}
9595
<code>nuxt.config.ts</code> file.
9696
</p>
9797
),
@@ -102,7 +102,7 @@ export let steps: Step[] = [
102102
import tailwindcss from "@tailwindcss/vite";
103103
104104
export default defineNuxtConfig({
105-
compatibilityDate: "2024-11-01",
105+
compatibilityDate: "2025-07-15",
106106
devtools: { enabled: true },
107107
// [!code highlight:2]
108108
css: ['~/assets/css/main.css'],

0 commit comments

Comments
 (0)