[{"data":1,"prerenderedAt":249},["ShallowReactive",2],{"post-getting-started-with-nuxt4":3},{"id":4,"title":5,"author":6,"body":7,"category":230,"cover":231,"date":232,"description":233,"extension":234,"featured":235,"meta":236,"navigation":235,"path":237,"published":235,"readingTime":238,"seo":239,"sitemap":240,"stem":242,"tags":243,"updated":241,"__hash__":248},"posts\u002Fposts\u002Fgetting-started-with-nuxt4.md","Getting Started with Nuxt 4","Kashyap Kumar",{"type":8,"value":9,"toc":226},"minimark",[10,14,17,33,38,41,56,94,109,128,149,155,160,173,179,182,212,222],[11,12,13],"p",{},"The Vue ecosystem has reached a major milestone with the release and stabilization of Nuxt 4. If you are looking to build a high-performance, SEO-friendly, and scalable web application in 2026, Nuxt 4 is your go-to meta-framework.",[11,15,16],{},"This guide will walk you through everything you need to know to get started, from installation to mastering the new directory structure and performance-driven features.",[11,18,19,20,24,25,28,29,32],{},"Key highlights in Nuxt 4 includes new ",[21,22,23],"code",{},"app\u002F"," directory, smarter data fetching using ",[21,26,27],{},"useFetch"," and ",[21,30,31],{},"useAsyncData"," and stricter TypeScript.",[34,35,37],"h2",{"id":36},"how-to-setup-a-nuxt-4-project","How to Setup a Nuxt 4 Project",[11,39,40],{},"Before setting up a new Nuxt 4 project, ensure you have Node.js v20.x or newer versions installed.",[11,42,43,44,47,48,51,52,55],{},"I'm using ",[21,45,46],{},"npm"," here, you're free to go with ",[21,49,50],{},"yarn"," or ",[21,53,54],{},"pnpm",".",[57,58,63],"pre",{"className":59,"code":60,"language":61,"meta":62,"style":62},"language-bash shiki shiki-themes github-light","npm create nuxt@latest \u003Cproject-name>\n","bash","",[21,64,65],{"__ignoreMap":62},[66,67,70,73,77,80,84,87,91],"span",{"class":68,"line":69},"line",1,[66,71,46],{"class":72},"s7eDp",[66,74,76],{"class":75},"sYBdl"," create",[66,78,79],{"class":75}," nuxt@latest",[66,81,83],{"class":82},"sD7c4"," \u003C",[66,85,86],{"class":75},"project-nam",[66,88,90],{"class":89},"sgsFI","e",[66,92,93],{"class":82},">\n",[11,95,96,97,100,101,104,105,108],{},"During setup, you’ll be asked to if you want to install additional module like ",[21,98,99],{},"@nuxt\u002Fcontent",", ",[21,102,103],{},"@nuxt\u002Ffonts"," etc. If you wish, select them hitting ",[21,106,107],{},"spacebar",". You can install them later as well.",[57,110,112],{"className":59,"code":111,"language":61,"meta":62,"style":62},"cd \u003Cproject-name>\n",[21,113,114],{"__ignoreMap":62},[66,115,116,120,122,124,126],{"class":68,"line":69},[66,117,119],{"class":118},"sYu0t","cd",[66,121,83],{"class":82},[66,123,86],{"class":75},[66,125,90],{"class":89},[66,127,93],{"class":82},[57,129,131],{"className":59,"code":130,"language":61,"meta":62,"style":62},"npm run dev -- -o\n",[21,132,133],{"__ignoreMap":62},[66,134,135,137,140,143,146],{"class":68,"line":69},[66,136,46],{"class":72},[66,138,139],{"class":75}," run",[66,141,142],{"class":75}," dev",[66,144,145],{"class":118}," --",[66,147,148],{"class":118}," -o\n",[11,150,151,152,55],{},"Now, your project is up and running at ",[21,153,154],{},"http:\u002F\u002Flocalhost:3000",[156,157,159],"h1",{"id":158},"nuxt-4s-new-directory-structure","Nuxt 4's New Directory Structure",[11,161,162,163,165,166,100,169,172],{},"One of the most significant changes in Nuxt 4 is the optional (but encouraged) ",[21,164,23],{}," directory. In previous versions, your root folder was cluttered with both logic (",[21,167,168],{},"pages\u002F",[21,170,171],{},"components\u002F",") and configuration.",[11,174,175,176,178],{},"In Nuxt 4, your core application lives inside ",[21,177,23],{},", while the root handles global configuration.",[11,180,181],{},"Let's understand the most important stuffs in the structure:",[183,184,185,191,197,203,206],"ul",{},[186,187,188,190],"li",{},[21,189,23],{},": Contains pages\u002F, components\u002F, layouts\u002F, and app.vue.\"",[186,192,193,196],{},[21,194,195],{},"server\u002F",": Nitro API routes and server-side middleware.",[186,198,199,202],{},[21,200,201],{},"public\u002F",": Static assets (favicons, robots.txt) served at the root.\"",[186,204,205],{},"`nuxt.config.ts: The central brain for your app's configuration.",[186,207,208,211],{},[21,209,210],{},"shared\u002F",": (New) Utilities or types shared between client and server code.",[11,213,214,215],{},"For more information on features, modules etc., visit the official ",[216,217,221],"a",{"href":218,"rel":219},"https:\u002F\u002Fnuxt.com\u002Fdocs\u002F4.x\u002Fgetting-started\u002Fintroduction",[220],"nofollow","Nuxt 4 documentation",[223,224,225],"style",{},"html pre.shiki code .s7eDp, html code.shiki .s7eDp{--shiki-default:#6F42C1}html pre.shiki code .sYBdl, html code.shiki .sYBdl{--shiki-default:#032F62}html pre.shiki code .sD7c4, html code.shiki .sD7c4{--shiki-default:#D73A49}html pre.shiki code .sgsFI, html code.shiki .sgsFI{--shiki-default:#24292E}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html pre.shiki code .sYu0t, html code.shiki .sYu0t{--shiki-default:#005CC5}",{"title":62,"searchDepth":227,"depth":227,"links":228},2,[229],{"id":36,"depth":227,"text":37},"Web Development","\u002Fblog-covers\u002Fnuxt4-guide.png","2026-01-10T00:00:00+05:30","A beginner's guide to building modern web applications with Nuxt 4","md",true,{},"\u002Fposts\u002Fgetting-started-with-nuxt4",null,{"title":5,"description":233},{"loc":237,"lastmod":241},"2026-01-16T00:00:00+05:30","posts\u002Fgetting-started-with-nuxt4",[244,245,246,247],"nuxt","vue","tutorial","web-development","RzgcxZN4OCLu9D9DIXFItteZsb0VQKWkGyxjMOcZtWM",1793045273799]