<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"><channel><title><![CDATA[vue.house]]></title><description><![CDATA[Your Premium Vue & Nuxt Content]]></description><link>https://www.vue.house</link><image><url>https://substackcdn.com/image/fetch/$s_!3NeI!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1bf903f-0963-44e7-addd-ddfe2251233d_800x800.png</url><title>vue.house</title><link>https://www.vue.house</link></image><generator>Substack</generator><lastBuildDate>Mon, 04 May 2026 09:34:47 GMT</lastBuildDate><atom:link href="https://www.vue.house/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Lukas Borawski]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[vuehouse@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[vuehouse@substack.com]]></itunes:email><itunes:name><![CDATA[Lukas Borawski]]></itunes:name></itunes:owner><itunes:author><![CDATA[Lukas Borawski]]></itunes:author><googleplay:owner><![CDATA[vuehouse@substack.com]]></googleplay:owner><googleplay:email><![CDATA[vuehouse@substack.com]]></googleplay:email><googleplay:author><![CDATA[Lukas Borawski]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[Docs with Nuxt Content 📚]]></title><description><![CDATA[Ultimate guide on how to create and roll Docs with Nuxt.js Content 3.0]]></description><link>https://www.vue.house/p/docs-with-nuxt-content</link><guid isPermaLink="false">https://www.vue.house/p/docs-with-nuxt-content</guid><dc:creator><![CDATA[Lukas Borawski]]></dc:creator><pubDate>Fri, 14 Feb 2025 19:20:53 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/3fc7e44b-e198-4b24-a00f-aee62c2ffdbe_840x600.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h4>What you&#8217;ll learn from this series?</h4><ol><li><p>Why project documentation is so <strong>important</strong>.</p></li><li><p>How to <strong>create and roll</strong> a new Docs app on top of Nuxt.js <strong><a href="https://content.nuxt.com?ref=vue.house">Content Module</a></strong>. </p></li><li><p>How to arrange it inside the Turborepo.</p></li><li><p>Docs application <strong>internals</strong>:</p><ol><li><p>layouts,</p></li><li><p>styling,</p></li><li><p>components,</p></li><li><p>utilities,</p></li><li><p>reusability,</p></li><li><p>scaling.</p></li></ol></li><li><p>Advanced techniques of managing data.</p></li><li><p>How to <strong>add Docs to</strong> <strong>existing</strong> Nuxt.js project.</p></li></ol><p>This will be a series, split into two or three articles, With this one we will cover the very basics, and with another one we will dive a bit deeper, covering more advanced stuff.</p><div><hr></div><p>I have an anecdote at first.</p><p>I&#8217;ve been building an ecosystem of packages for a framework - one of those side projects that grew organically over time. One package was almost done, just needing a few final touches. But before wrapping it up, I switched my focus into another one. Since this was a side project, progress happened in bursts over several weeks. </p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.vue.house/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption"><strong>Don&#8217;t miss any of new posts</strong>. It&#8217;s free, no account or registration needed. <strong>Just leave your email address</strong>. You&#8217;ll not regret. Thanks.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p>When I finally returned to the first package, I hit a wall. <strong>How did this thing even work again?</strong> The logic that once felt so obvious now seemed like a puzzle. Hours went by as I dug through the code, retracing my own steps like a detective trying to solve a mystery left behind. Eventually, I figured it out, the code quality was good enough - but not without frustration. If I had just taken a few minutes to document the structure, my key decisions about the internal APIs, and intended next steps, I could have saved all that lost time. Bummer.</p><p>The lesson was clear<strong>: when you don&#8217;t document your work, you&#8217;re leaving future-you a mess to clean up. </strong>Whether it&#8217;s in the code or separate documentation, <strong>you must write it down.</strong> Your future self - and anyone else who touches the project - will thank you. Without documentation, even your own work can feel like a black box after a (just) few weeks away. Again, a few simple notes on structure, key decisions, and next steps can save hours of frustration and make your project easier to maintain, extend, and collaborate on. </p><h4><strong>If it&#8217;s worth building, it&#8217;s worth documenting!</strong></h4><div><hr></div><p>I hope this story resonates with you at some point and encourages you to pay more attention to documentation. Since we've started this discussion, let's frame it within our current context: a <a href="https://www.vue.house/p/nuxt-4-the-first-steps?r=18rvtd">newly created Nuxt 4 app</a> <a href="https://www.vue.house/p/nuxt-with-turborepo?r=18rvtd">set up in a monorepo</a>. This is an excellent opportunity to launch a fresh Nuxt app and explore the full potential of Turborepo's capabilities.</p><p>OK, so the recommended way to build documentation on Nuxt is by using its official Content Module, <strong><a href="https://content.nuxt.com/docs/getting-started/installation">Nuxt Content</a> (NC)</strong>. It provides a comprehensive set of tools, including components, composables, and extensibility utils, making it suitable for various content-driven applications such as <strong>blogs, landing pages, and, of course, documentation</strong>. You can initialize it along with your current, already-existing project and/or build a fresh, independent application, which we&#8217;ll try to do here. No worries, at the end I&#8217;ll describe how to achieve it also with a regular Nuxt app. Let&#8217;s go!</p><div><hr></div><p>Go to your <code>apps/</code> folder and create a new one, named <code>docs</code>, or whatever you like. Inside this folder we need to initialize a new Nuxt application, we can do it by using <code>nuxi</code> (<a href="https://www.vue.house/p/nuxt-4-the-first-steps?r=18rvtd">here you can read more about nuxi</a>). Use this command.</p><pre><code>pnpm dlx nuxi@latest init</code></pre><p>(remember? <a href="https://www.vue.house/i/156672725/pnpm">we&#8217;re using pnpm now</a>, for everything, if possible &#128540;)</p><p>OK, <strong>new application will be initialized</strong>. Before we move further we need to clean a bit around common internals. Here - at first - I have ESLint in mind. You can install it along. To do this jump into the <code>apps/docs/</code> context. There run the <a href="https://www.vue.house/i/154776385/linter-and-prettier">installation procedure described here</a>. However, at this very moment we will face doubling the same dependencies and configuration. That&#8217;s not prefect situation. This is where the magic of a Turborepo steps in. </p><p>Inside <code>packages/config/eslint</code> folder create a new <code>nuxt.base.mjs</code> file. There paste the Nuxt-related configuration from the <code>apps/web/</code> app. Like that.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!G3ZN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e36dd28-e710-422a-9725-9e9cacb7aead_1460x568.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!G3ZN!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e36dd28-e710-422a-9725-9e9cacb7aead_1460x568.png 424w, https://substackcdn.com/image/fetch/$s_!G3ZN!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e36dd28-e710-422a-9725-9e9cacb7aead_1460x568.png 848w, https://substackcdn.com/image/fetch/$s_!G3ZN!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e36dd28-e710-422a-9725-9e9cacb7aead_1460x568.png 1272w, https://substackcdn.com/image/fetch/$s_!G3ZN!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e36dd28-e710-422a-9725-9e9cacb7aead_1460x568.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!G3ZN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e36dd28-e710-422a-9725-9e9cacb7aead_1460x568.png" width="1456" height="566" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2e36dd28-e710-422a-9725-9e9cacb7aead_1460x568.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:566,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:62879,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!G3ZN!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e36dd28-e710-422a-9725-9e9cacb7aead_1460x568.png 424w, https://substackcdn.com/image/fetch/$s_!G3ZN!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e36dd28-e710-422a-9725-9e9cacb7aead_1460x568.png 848w, https://substackcdn.com/image/fetch/$s_!G3ZN!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e36dd28-e710-422a-9725-9e9cacb7aead_1460x568.png 1272w, https://substackcdn.com/image/fetch/$s_!G3ZN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e36dd28-e710-422a-9725-9e9cacb7aead_1460x568.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">packages/config/eslint/nuxt.base.mjs</figcaption></figure></div><p>Just after expose this file through your <code>package.json</code>.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!i58U!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8640944-7da5-4ece-94ad-c7c09a334b9a_1460x806.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!i58U!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8640944-7da5-4ece-94ad-c7c09a334b9a_1460x806.png 424w, https://substackcdn.com/image/fetch/$s_!i58U!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8640944-7da5-4ece-94ad-c7c09a334b9a_1460x806.png 848w, https://substackcdn.com/image/fetch/$s_!i58U!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8640944-7da5-4ece-94ad-c7c09a334b9a_1460x806.png 1272w, https://substackcdn.com/image/fetch/$s_!i58U!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8640944-7da5-4ece-94ad-c7c09a334b9a_1460x806.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!i58U!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8640944-7da5-4ece-94ad-c7c09a334b9a_1460x806.png" width="1456" height="804" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e8640944-7da5-4ece-94ad-c7c09a334b9a_1460x806.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:804,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:80124,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!i58U!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8640944-7da5-4ece-94ad-c7c09a334b9a_1460x806.png 424w, https://substackcdn.com/image/fetch/$s_!i58U!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8640944-7da5-4ece-94ad-c7c09a334b9a_1460x806.png 848w, https://substackcdn.com/image/fetch/$s_!i58U!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8640944-7da5-4ece-94ad-c7c09a334b9a_1460x806.png 1272w, https://substackcdn.com/image/fetch/$s_!i58U!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8640944-7da5-4ece-94ad-c7c09a334b9a_1460x806.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">packages/config/eslint/package.json</figcaption></figure></div><p>Now as we have our common Nuxt ESLint configuration exposed from the <code>@yourmonorepo/eslint-config </code>package we can use it along with both, <code>apps/web</code> and <code>apps/docs</code> applications. Use it like this.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!NUlM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7aa2ab3a-d6d3-4440-8628-21780eb1860b_1460x450.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!NUlM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7aa2ab3a-d6d3-4440-8628-21780eb1860b_1460x450.png 424w, https://substackcdn.com/image/fetch/$s_!NUlM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7aa2ab3a-d6d3-4440-8628-21780eb1860b_1460x450.png 848w, https://substackcdn.com/image/fetch/$s_!NUlM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7aa2ab3a-d6d3-4440-8628-21780eb1860b_1460x450.png 1272w, https://substackcdn.com/image/fetch/$s_!NUlM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7aa2ab3a-d6d3-4440-8628-21780eb1860b_1460x450.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!NUlM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7aa2ab3a-d6d3-4440-8628-21780eb1860b_1460x450.png" width="1456" height="449" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7aa2ab3a-d6d3-4440-8628-21780eb1860b_1460x450.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:449,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:89495,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!NUlM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7aa2ab3a-d6d3-4440-8628-21780eb1860b_1460x450.png 424w, https://substackcdn.com/image/fetch/$s_!NUlM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7aa2ab3a-d6d3-4440-8628-21780eb1860b_1460x450.png 848w, https://substackcdn.com/image/fetch/$s_!NUlM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7aa2ab3a-d6d3-4440-8628-21780eb1860b_1460x450.png 1272w, https://substackcdn.com/image/fetch/$s_!NUlM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7aa2ab3a-d6d3-4440-8628-21780eb1860b_1460x450.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">[apps/web | apps/docs]/eslint.config.mjs</figcaption></figure></div><p>Yeah - <strong>magic of monorepo</strong>, you can share lot of stuff the same way, just like that.</p><div><hr></div><h4><strong>&#128161; Useful Tip</strong></h4><p>From the root of your monorepo, inside the <code>package.json</code> file you can add dedicated scripts to run just one app at a time - if you don&#8217;t need them going all together. Do it like that.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Kxag!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f0909a7-af31-4a45-ac8d-c7de24b5f535_1460x628.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Kxag!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f0909a7-af31-4a45-ac8d-c7de24b5f535_1460x628.png 424w, https://substackcdn.com/image/fetch/$s_!Kxag!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f0909a7-af31-4a45-ac8d-c7de24b5f535_1460x628.png 848w, https://substackcdn.com/image/fetch/$s_!Kxag!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f0909a7-af31-4a45-ac8d-c7de24b5f535_1460x628.png 1272w, https://substackcdn.com/image/fetch/$s_!Kxag!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f0909a7-af31-4a45-ac8d-c7de24b5f535_1460x628.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Kxag!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f0909a7-af31-4a45-ac8d-c7de24b5f535_1460x628.png" width="1456" height="626" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5f0909a7-af31-4a45-ac8d-c7de24b5f535_1460x628.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:626,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:80006,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Kxag!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f0909a7-af31-4a45-ac8d-c7de24b5f535_1460x628.png 424w, https://substackcdn.com/image/fetch/$s_!Kxag!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f0909a7-af31-4a45-ac8d-c7de24b5f535_1460x628.png 848w, https://substackcdn.com/image/fetch/$s_!Kxag!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f0909a7-af31-4a45-ac8d-c7de24b5f535_1460x628.png 1272w, https://substackcdn.com/image/fetch/$s_!Kxag!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f0909a7-af31-4a45-ac8d-c7de24b5f535_1460x628.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">package.json</figcaption></figure></div><div><hr></div><p>Awesome! Let&#8217;s get back to the main topic, our Docs. I&#8217;ve mentioned already that the best way to build Docs on Nuxt is to <strong>use their official Content Module</strong>, which we will execute right now. Inside your Docs (<code>apps/docs</code>) app please run this command.</p><pre><code>pnpm add @nuxt/content</code></pre><p>Next, add new module <code>@nuxt/content</code> to the Docs <code>nuxt.config.ts</code> file.</p><p><strong>Two more things,</strong> before we move on - as we&#8217;ve decided to work within the context of Nuxt 4, let&#8217;s rearrange our directory structure, <a href="https://www.vue.house/p/nuxt-4-the-first-steps">as shown and described here</a>.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.vue.house/?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share&quot;,&quot;text&quot;:&quot;Share vue.house&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.vue.house/?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share"><span>Share vue.house</span></a></p><p>It would be also beneficial, since we are working within the monorepo environment, to define dedicated port for our Docs app. Add this to your Docs app <code>nuxt.config.ts</code> file.</p><pre><code>{
  ... rest of the config
  devServer: {
    port: 3010,
  },
}</code></pre><p>Great, now we can proceed. Please, inside the <code>apps/docs/</code> folder create a new configuration <code>content.config.ts</code> file for the NC Module. Like for Nuxt itself NC also need a dedicated configuration. Inside this file define the initial, very minimal configuration. Add <code>collections</code> object and define it&#8217;s name by <strong>custom</strong> key, then use the <code>defineCollection</code> macro function to properly establish the content collection.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!MJjn!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69a1d6c5-c19c-40d5-b808-c0c37b935c25_1460x748.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!MJjn!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69a1d6c5-c19c-40d5-b808-c0c37b935c25_1460x748.png 424w, https://substackcdn.com/image/fetch/$s_!MJjn!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69a1d6c5-c19c-40d5-b808-c0c37b935c25_1460x748.png 848w, https://substackcdn.com/image/fetch/$s_!MJjn!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69a1d6c5-c19c-40d5-b808-c0c37b935c25_1460x748.png 1272w, https://substackcdn.com/image/fetch/$s_!MJjn!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69a1d6c5-c19c-40d5-b808-c0c37b935c25_1460x748.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!MJjn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69a1d6c5-c19c-40d5-b808-c0c37b935c25_1460x748.png" width="1456" height="746" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/69a1d6c5-c19c-40d5-b808-c0c37b935c25_1460x748.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:746,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:93810,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!MJjn!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69a1d6c5-c19c-40d5-b808-c0c37b935c25_1460x748.png 424w, https://substackcdn.com/image/fetch/$s_!MJjn!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69a1d6c5-c19c-40d5-b808-c0c37b935c25_1460x748.png 848w, https://substackcdn.com/image/fetch/$s_!MJjn!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69a1d6c5-c19c-40d5-b808-c0c37b935c25_1460x748.png 1272w, https://substackcdn.com/image/fetch/$s_!MJjn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69a1d6c5-c19c-40d5-b808-c0c37b935c25_1460x748.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">apps/docs/content.config.ts</figcaption></figure></div><p>Before we move forward I&#8217;d like to highlight the <strong>key mental model</strong> that is crucial for working efficiently with Nuxt Content. The most important thing to understand is that you're still <strong>working with a regular Nuxt application</strong>, meaning you can do everything you would in any other Nuxt project. The NC simply adds extra capabilities for reading, rendering, and managing local content written in markdown-like formats. The best way to think about it is as a <strong>content database</strong> that needs to be handled within your app. You&#8217;ll still need pages, components, styles, and logic to properly display and organize your content throughout the application.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.vue.house/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption"><strong>Subscribe </strong>to get<strong> email-only</strong>,<strong> </strong>weekly updates from<strong> </strong>the<strong> Vue, Nuxt &amp; Tech </strong>world. It&#8217;s free!</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p>The <strong>approach to building content applications it&#8217;s a bit different</strong> that it was within the previous versions. Right now you&#8217;re starting with a blank and empty app that will require building overall UI and presentation, which means it has to be covered by you, as a <strong>custom implementation</strong> (for your company i.e.). You have <strong>second option</strong> though, using one of the <a href="https://content.nuxt.com/templates?ref=vue.house">predefined, prebuilt templates</a>. Will get there in a moment.</p><p>Perfect, let&#8217;s get back to our configuration file. What you can see here (actually, up there) is a definition of our <code>content</code> collection. By default NC will read data from the <code>/content</code> folder, so when you&#8217;ll use a dedicated utility to fetch content data, each file will be read and transformed to a dedicated format. By defining <code>type</code> you can select rather it will be a paged dedicated format or raw data one. It might be important for you when you&#8217;d need to deliver some custom data structures, it&#8217;s more advanced topic though, that we can discuss soon. Finally, by defining <code>source</code> you can point the exact path of the collection source and the files format to be read.</p><p>Time for some actions - let&#8217;s add a test content. Inside the <code>content/</code> folder create a new file <code>/content/index.md</code>. Put there this simple code.</p><pre><code>---
title: Home
description: Test Home Page
---

# Home
Test Home Page</code></pre><p>OK, from that moment you may see some <strong>ESLint warnings</strong> in your IDE, shown along with the code. In fact, this is a dedicated <strong><a href="https://github.com/DavidAnson/markdownlint">MarkdownLint</a></strong> added to the NC. Here you have two options to handle these warnings. You can correct the code (obviously, daa), or manage the markdown linter rules from a dedicated file. To do it create a new <code>.markdownlint.json</code> config file inside the root folder of your Docs app. From here you are able to structure the rules for linting your markdown code. So my suggestion here would be to not improve the code syntax and add this notation.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!s30V!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6bedf270-3133-48d0-8947-efa7e7ceb8c7_1460x510.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!s30V!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6bedf270-3133-48d0-8947-efa7e7ceb8c7_1460x510.png 424w, https://substackcdn.com/image/fetch/$s_!s30V!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6bedf270-3133-48d0-8947-efa7e7ceb8c7_1460x510.png 848w, https://substackcdn.com/image/fetch/$s_!s30V!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6bedf270-3133-48d0-8947-efa7e7ceb8c7_1460x510.png 1272w, https://substackcdn.com/image/fetch/$s_!s30V!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6bedf270-3133-48d0-8947-efa7e7ceb8c7_1460x510.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!s30V!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6bedf270-3133-48d0-8947-efa7e7ceb8c7_1460x510.png" width="1456" height="509" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6bedf270-3133-48d0-8947-efa7e7ceb8c7_1460x510.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:509,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:38797,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!s30V!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6bedf270-3133-48d0-8947-efa7e7ceb8c7_1460x510.png 424w, https://substackcdn.com/image/fetch/$s_!s30V!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6bedf270-3133-48d0-8947-efa7e7ceb8c7_1460x510.png 848w, https://substackcdn.com/image/fetch/$s_!s30V!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6bedf270-3133-48d0-8947-efa7e7ceb8c7_1460x510.png 1272w, https://substackcdn.com/image/fetch/$s_!s30V!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6bedf270-3133-48d0-8947-efa7e7ceb8c7_1460x510.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">apps/docs/.markdownlint.json</figcaption></figure></div><p>You should see that warnings are gone. You can define your own custom rules <a href="https://github.com/DavidAnson/markdownlint/blob/main/schema/.markdownlint.jsonc">on top of this guidelines</a>, or just follow the default, predefined ones. Up to you.</p><p>Now, as we&#8217;ve defined our very first content file let&#8217;s go and display it. Jump into the <code>app/index.vue</code> file and add this code inside.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!A7du!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59ac4d6e-ba2c-44fa-9e58-a40341ac5ef4_1460x748.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!A7du!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59ac4d6e-ba2c-44fa-9e58-a40341ac5ef4_1460x748.png 424w, https://substackcdn.com/image/fetch/$s_!A7du!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59ac4d6e-ba2c-44fa-9e58-a40341ac5ef4_1460x748.png 848w, https://substackcdn.com/image/fetch/$s_!A7du!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59ac4d6e-ba2c-44fa-9e58-a40341ac5ef4_1460x748.png 1272w, https://substackcdn.com/image/fetch/$s_!A7du!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59ac4d6e-ba2c-44fa-9e58-a40341ac5ef4_1460x748.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!A7du!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59ac4d6e-ba2c-44fa-9e58-a40341ac5ef4_1460x748.png" width="1456" height="746" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/59ac4d6e-ba2c-44fa-9e58-a40341ac5ef4_1460x748.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:746,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:108545,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!A7du!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59ac4d6e-ba2c-44fa-9e58-a40341ac5ef4_1460x748.png 424w, https://substackcdn.com/image/fetch/$s_!A7du!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59ac4d6e-ba2c-44fa-9e58-a40341ac5ef4_1460x748.png 848w, https://substackcdn.com/image/fetch/$s_!A7du!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59ac4d6e-ba2c-44fa-9e58-a40341ac5ef4_1460x748.png 1272w, https://substackcdn.com/image/fetch/$s_!A7du!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59ac4d6e-ba2c-44fa-9e58-a40341ac5ef4_1460x748.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">apps/docs/app/pages/index.vue | <a href="https://gist.githubusercontent.com/lukasborawski/fe7a026f66b600432c7d90d17dfbcca5/raw/e2190c9d824a9bf45d89158a41ba7a5a084ff7eb/index.vue">Source</a></figcaption></figure></div><p>Check out your console now. You should see the <code>ref</code> (<a href="https://vuejs.org/api/reactivity-core.html#ref">dosc</a>) object with your content data. Digg, check out what&#8217;s inside. You&#8217;ll get there an array with the parsed <code>index.md</code> file data that we&#8217;ve just created. It will be located within the <code>body</code> object in which you will get the structured <code>value</code> of the content and the table of contents (<code>toc</code>) additional object, that will provide you links for your page navigation. You can decide how deep it should parse the document. By deep parse I mean what level of the document headers should be included within this structure. You can decide about that by defining <code>content</code> configuration within your <code>nuxt.config.ts</code> file. This is because you can still have your content along with the main app, also content configuration might be lined with the Nuxt configuration itself. So this is how it should looks like.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!OmLa!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5240b4e7-7fbe-433f-a287-389d94077c10_1460x1044.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!OmLa!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5240b4e7-7fbe-433f-a287-389d94077c10_1460x1044.png 424w, https://substackcdn.com/image/fetch/$s_!OmLa!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5240b4e7-7fbe-433f-a287-389d94077c10_1460x1044.png 848w, https://substackcdn.com/image/fetch/$s_!OmLa!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5240b4e7-7fbe-433f-a287-389d94077c10_1460x1044.png 1272w, https://substackcdn.com/image/fetch/$s_!OmLa!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5240b4e7-7fbe-433f-a287-389d94077c10_1460x1044.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!OmLa!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5240b4e7-7fbe-433f-a287-389d94077c10_1460x1044.png" width="1456" height="1041" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5240b4e7-7fbe-433f-a287-389d94077c10_1460x1044.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1041,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:99379,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!OmLa!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5240b4e7-7fbe-433f-a287-389d94077c10_1460x1044.png 424w, https://substackcdn.com/image/fetch/$s_!OmLa!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5240b4e7-7fbe-433f-a287-389d94077c10_1460x1044.png 848w, https://substackcdn.com/image/fetch/$s_!OmLa!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5240b4e7-7fbe-433f-a287-389d94077c10_1460x1044.png 1272w, https://substackcdn.com/image/fetch/$s_!OmLa!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5240b4e7-7fbe-433f-a287-389d94077c10_1460x1044.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">apps/docs/nuxt.config.ts</figcaption></figure></div><p>On top of that, when you&#8217;ll use <code>h3</code> hading level (<code>### Header</code>) inside your markdown files it will be included with the <code>toc</code> object, provided by the content fetching utility. </p><p>Alright, so as we&#8217;ve fetched our content, now it would be ideal moment to display it along with the page. To do so you need to use <code>&lt;ContentRenderer&gt;</code> component. Along with the code of our page it should looks more less like that.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!fZNU!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb15adf5-c3bf-426e-bb1b-07d8b29d8c3d_1460x1104.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!fZNU!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb15adf5-c3bf-426e-bb1b-07d8b29d8c3d_1460x1104.png 424w, https://substackcdn.com/image/fetch/$s_!fZNU!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb15adf5-c3bf-426e-bb1b-07d8b29d8c3d_1460x1104.png 848w, https://substackcdn.com/image/fetch/$s_!fZNU!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb15adf5-c3bf-426e-bb1b-07d8b29d8c3d_1460x1104.png 1272w, https://substackcdn.com/image/fetch/$s_!fZNU!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb15adf5-c3bf-426e-bb1b-07d8b29d8c3d_1460x1104.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!fZNU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb15adf5-c3bf-426e-bb1b-07d8b29d8c3d_1460x1104.png" width="1456" height="1101" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bb15adf5-c3bf-426e-bb1b-07d8b29d8c3d_1460x1104.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1101,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:177684,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!fZNU!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb15adf5-c3bf-426e-bb1b-07d8b29d8c3d_1460x1104.png 424w, https://substackcdn.com/image/fetch/$s_!fZNU!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb15adf5-c3bf-426e-bb1b-07d8b29d8c3d_1460x1104.png 848w, https://substackcdn.com/image/fetch/$s_!fZNU!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb15adf5-c3bf-426e-bb1b-07d8b29d8c3d_1460x1104.png 1272w, https://substackcdn.com/image/fetch/$s_!fZNU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb15adf5-c3bf-426e-bb1b-07d8b29d8c3d_1460x1104.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">apps/docs/app/pages/index.vue | <a href="https://gist.githubusercontent.com/lukasborawski/e3b2125f6215e8cd793f2100eea669f2/raw/66f517518619d99cc47837520d3d98c447eec5e9/index.vue">Source</a></figcaption></figure></div><p>Right, let&#8217;s unpack this. Firstly, look at the line <code>11</code>, where we have already defined content data fetcher. We&#8217;ve changed one thing here, now it&#8217;s used <code>first()</code> method, not <code>all()</code>. That&#8217;s because <code>queryCollection</code> utility with <code>all </code>method chained (as name suggests) fetches all of the pages from the content collection. It&#8217;s fine, however to render it properly we would need to iterate over the results, which means to use <code>v-for</code> on top of the <code>&lt;ContentRenderer&gt; </code>component. Also, we don&#8217;t need to render all of the pages as one. To be more precise with defining which page you&#8217;re actually intended to fetch you can use other methods like <code>select()</code> or <code>where()</code> (<a href="https://content.nuxt.com/docs/utils/query-collection#selectfields-keyof-collection">more about here</a>)<code>.</code></p><p>Next, we have simple <a href="https://vuejs.org/guide/essentials/computed.html#computed-properties">computed property</a> <code>containerIsEmpty</code> that will check if the page data even exists and will help us to display proper content along withe the page and its template. </p><p>About the template. We&#8217;ve added <code>&lt;ContentRenderer&gt;</code> component where fetched data was passed; through the <code>:value</code> property. Additionally we have the condition that is handling either it should show the content or &#8220;empty page&#8221; placeholder.</p><p>Enough talking. You should now see your content rendered on the <code>index</code> page. You should see something like this. Is it there? Yeah? Great!</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!SJmh!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6014d47-ef00-467c-a0f4-b25008b4291d_1460x312.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!SJmh!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6014d47-ef00-467c-a0f4-b25008b4291d_1460x312.png 424w, https://substackcdn.com/image/fetch/$s_!SJmh!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6014d47-ef00-467c-a0f4-b25008b4291d_1460x312.png 848w, https://substackcdn.com/image/fetch/$s_!SJmh!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6014d47-ef00-467c-a0f4-b25008b4291d_1460x312.png 1272w, https://substackcdn.com/image/fetch/$s_!SJmh!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6014d47-ef00-467c-a0f4-b25008b4291d_1460x312.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!SJmh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6014d47-ef00-467c-a0f4-b25008b4291d_1460x312.png" width="1456" height="311" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c6014d47-ef00-467c-a0f4-b25008b4291d_1460x312.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:311,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:33433,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!SJmh!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6014d47-ef00-467c-a0f4-b25008b4291d_1460x312.png 424w, https://substackcdn.com/image/fetch/$s_!SJmh!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6014d47-ef00-467c-a0f4-b25008b4291d_1460x312.png 848w, https://substackcdn.com/image/fetch/$s_!SJmh!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6014d47-ef00-467c-a0f4-b25008b4291d_1460x312.png 1272w, https://substackcdn.com/image/fetch/$s_!SJmh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6014d47-ef00-467c-a0f4-b25008b4291d_1460x312.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>By default your content will be rendered with the <strong>prose</strong> components. What are they? <strong><a href="https://content.nuxt.com/docs/components/prose">Prose components</a></strong> are replacements for HTML native typography tags. <a href="https://content.nuxt.com/docs/components/prose">Prose components</a> provide a simple way to customize content UI. You can replace them also with your custom ones. What&#8217;s more important <strong><a href="https://github.com/tailwindlabs/tailwindcss-typography">Tailwind CSS</a></strong><a href="https://github.com/tailwindlabs/tailwindcss-typography"> supports this solution</a> as well, improving your typography a lot.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.vue.house/?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share&quot;,&quot;text&quot;:&quot;Share vue.house&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.vue.house/?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share"><span>Share vue.house</span></a></p><p>It&#8217;s also noticeable that the H2 heading was rendered as a link. It&#8217;s like that because this must be an anchor for the navigation. <code>ID(#id)</code> will be added automatically so navigating, as well as linking to a certain content portion/section will be much easier. There is an option to disable it tho. You can achieve that by defining which heading should be rendered as a link within the <code>nuxt.config.ts</code> file.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!i7hQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc296672-6b3b-4f69-af52-636d57a32cfb_1460x1164.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!i7hQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc296672-6b3b-4f69-af52-636d57a32cfb_1460x1164.png 424w, https://substackcdn.com/image/fetch/$s_!i7hQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc296672-6b3b-4f69-af52-636d57a32cfb_1460x1164.png 848w, https://substackcdn.com/image/fetch/$s_!i7hQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc296672-6b3b-4f69-af52-636d57a32cfb_1460x1164.png 1272w, https://substackcdn.com/image/fetch/$s_!i7hQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc296672-6b3b-4f69-af52-636d57a32cfb_1460x1164.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!i7hQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc296672-6b3b-4f69-af52-636d57a32cfb_1460x1164.png" width="1456" height="1161" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bc296672-6b3b-4f69-af52-636d57a32cfb_1460x1164.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1161,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:108669,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!i7hQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc296672-6b3b-4f69-af52-636d57a32cfb_1460x1164.png 424w, https://substackcdn.com/image/fetch/$s_!i7hQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc296672-6b3b-4f69-af52-636d57a32cfb_1460x1164.png 848w, https://substackcdn.com/image/fetch/$s_!i7hQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc296672-6b3b-4f69-af52-636d57a32cfb_1460x1164.png 1272w, https://substackcdn.com/image/fetch/$s_!i7hQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc296672-6b3b-4f69-af52-636d57a32cfb_1460x1164.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">apps/docs/nuxt.config.ts</figcaption></figure></div><p>Before we <strong>step into the second post</strong>, and some more advanced stuff I would like to initialize the core of that build - the Docs content. Of course, any intro/landing page will be welcomed, but the most important thing for us here had to be the Docs.</p><p>Inside the <code>content/</code> directory (we&#8217;re still in the <code>apps/docs/</code> context) create a new one called <code>docs/</code>, inside of which add new <code>index.md</code> file. Put the some test content, it can be even the same as for the <code>content/index.md</code>. OK, just after you need to add a new collection inside the <code>content.config.ts</code> file. Something like this.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!TjR4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd629a4a7-8404-4bfa-b875-f3f68c65d488_1460x866.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!TjR4!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd629a4a7-8404-4bfa-b875-f3f68c65d488_1460x866.png 424w, https://substackcdn.com/image/fetch/$s_!TjR4!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd629a4a7-8404-4bfa-b875-f3f68c65d488_1460x866.png 848w, https://substackcdn.com/image/fetch/$s_!TjR4!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd629a4a7-8404-4bfa-b875-f3f68c65d488_1460x866.png 1272w, https://substackcdn.com/image/fetch/$s_!TjR4!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd629a4a7-8404-4bfa-b875-f3f68c65d488_1460x866.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!TjR4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd629a4a7-8404-4bfa-b875-f3f68c65d488_1460x866.png" width="1456" height="864" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d629a4a7-8404-4bfa-b875-f3f68c65d488_1460x866.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:864,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:95084,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!TjR4!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd629a4a7-8404-4bfa-b875-f3f68c65d488_1460x866.png 424w, https://substackcdn.com/image/fetch/$s_!TjR4!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd629a4a7-8404-4bfa-b875-f3f68c65d488_1460x866.png 848w, https://substackcdn.com/image/fetch/$s_!TjR4!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd629a4a7-8404-4bfa-b875-f3f68c65d488_1460x866.png 1272w, https://substackcdn.com/image/fetch/$s_!TjR4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd629a4a7-8404-4bfa-b875-f3f68c65d488_1460x866.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">apps/docs/content.config.ts</figcaption></figure></div><p>This way our data fetcher, defined inside the <code>pages/index.vue</code> component will fetch also content from the <code>docs/</code> folder. <strong>But hey, we don&#8217;t want that</strong>! We don&#8217;t need docs content on the landing page. Right? Well, to avoid this kind of behavior we can exclude it from <code>content</code> collection. Do it like that.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!yyoc!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a958a80-3f2f-40bb-b934-b7559fd5463b_1460x870.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!yyoc!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a958a80-3f2f-40bb-b934-b7559fd5463b_1460x870.png 424w, https://substackcdn.com/image/fetch/$s_!yyoc!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a958a80-3f2f-40bb-b934-b7559fd5463b_1460x870.png 848w, https://substackcdn.com/image/fetch/$s_!yyoc!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a958a80-3f2f-40bb-b934-b7559fd5463b_1460x870.png 1272w, https://substackcdn.com/image/fetch/$s_!yyoc!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a958a80-3f2f-40bb-b934-b7559fd5463b_1460x870.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!yyoc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a958a80-3f2f-40bb-b934-b7559fd5463b_1460x870.png" width="1456" height="868" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1a958a80-3f2f-40bb-b934-b7559fd5463b_1460x870.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:868,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:108314,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!yyoc!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a958a80-3f2f-40bb-b934-b7559fd5463b_1460x870.png 424w, https://substackcdn.com/image/fetch/$s_!yyoc!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a958a80-3f2f-40bb-b934-b7559fd5463b_1460x870.png 848w, https://substackcdn.com/image/fetch/$s_!yyoc!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a958a80-3f2f-40bb-b934-b7559fd5463b_1460x870.png 1272w, https://substackcdn.com/image/fetch/$s_!yyoc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a958a80-3f2f-40bb-b934-b7559fd5463b_1460x870.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">apps/docs/content.config.ts</figcaption></figure></div><p>That&#8217;s it, now landing page <strong>data will be only restricted</strong> to what we have inside the main container. Of course when you&#8217;ll add more data like <code>docs/</code> there will be a need to define additional rules for them, but you can proceed adequately.</p><div><hr></div><p>OK, we can stop here. <strong>With another post I&#8217;ll cover templates and overall visual aspect of content presentation</strong>. If you don&#8217;t want to miss it, and you&#8217;re not a subscriber yet please join - it&#8217;s free, you don&#8217;t need account or registration. I promise! Thanks in advance, Lukas. Enjoy!</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.vue.house/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.vue.house/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><p>Please <strong>let me know how you find this article</strong>. What I can improve?</p><div class="poll-embed" data-attrs="{&quot;id&quot;:273168}" data-component-name="PollToDOM"></div><p></p>]]></content:encoded></item><item><title><![CDATA[Nuxt with Turborepo 💨]]></title><description><![CDATA[There are only good things about this setup. Your Nuxt.js app will be definitely grateful! Try it out now, no regrets.]]></description><link>https://www.vue.house/p/nuxt-with-turborepo</link><guid isPermaLink="false">https://www.vue.house/p/nuxt-with-turborepo</guid><dc:creator><![CDATA[Lukas Borawski]]></dc:creator><pubDate>Mon, 10 Feb 2025 12:37:32 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/b489187b-dd28-485f-add9-b39da74c3133_840x600.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Hey! Before you walk away, wondering why you&#8217;d ever need a monorepo for your small and not-so-complicated <strong><a href="https://nuxt.com?ref=vue.house">Nuxt</a></strong> application, stick with me for a moment. I promise to keep it light and only share practical, no-nonsense reasons that might just change your mind. I promise, only legit arguments.</p><div><hr></div><p>As for now - to me - a natural way of setting up a new application environments is to put them into the monorepo surroundings. What for you&#8217;d ask?! Let me describe you a couple of potentialities where it can be super beneficial for you and your future development process. </p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.vue.house/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption"><strong>Subscribe</strong> to get <strong>email-only</strong>, weekly updates from the <strong>Vue, Nuxt &amp; Tech</strong> world. It&#8217;s free!</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><h4><strong>Multiple Applications</strong></h4><p>Let&#8217;s say you start with a single, small Nuxt app, happily living in its own repository. But as time goes on, the app grows. New features, dependencies, and complexities start piling up. At some point, you realize that to properly document everything&#8212;its structure, API, and best practices - you need dedicated documentation. </p><p>Now, mixing that documentation directly within your main app&#8217;s codebase? Not the best idea. Instead, you decide to create a separate Nuxt-powered documentation site using the <strong>Nuxt Content</strong> module, generating a static site for all your docs.</p><p>But here&#8217;s the catch: your original app is dynamic - it&#8217;s not meant to be static, and you don&#8217;t want to introduce unnecessary complexity by juggling different rendering strategies in the same project.</p><p>And that&#8217;s where a monorepo makes perfect sense. You keep both applications <strong>close but separate</strong>, maintaining clear boundaries while still benefiting from shared dependencies, streamlined development, and a unified workflow. Sounds like a solid reason to go monorepo, right? Let&#8217;s go further.</p><h4>Shared Configuration</h4><p>Now, imagine both apps living together in a single repository. While they serve different purposes, they share a lot in terms of structure and configuration - things like <strong>ESLint, Prettier, TypeScript, </strong>and even<strong> Tailwind</strong>. Duplicating these configurations across both apps? Not ideal.</p><p>This is where a <strong>monorepo</strong> shines. Instead of maintaining separate, nearly identical setups, you can create <strong>shared packages</strong> for common configurations and utilities, making them easily reusable across both apps. This not only <strong>reduces duplication</strong> but also <strong>keeps everything consistent</strong> and easier to maintain.</p><p>With a monorepo, you gain efficiency, better organization, and a cleaner development workflow - all while keeping your apps close, but neatly separated.</p><h4>Nuxt Extensibility</h4><p>Finally, let&#8217;s talk about Nuxt&#8217;s extensibility system. For years, <strong><a href="https://nuxt.com/docs/guide/concepts/modules?ref=vue.house">Modules</a></strong> have been the go-to way to extend Nuxt applications with additional functionality. Traditionally, we could place them directly inside the <code>modules/</code> directory of a project, but in most cases, they&#8217;ve been distributed as external <strong>npm packages</strong>, maintained by the community.</p><p>Now, with the latest updates, the <strong>Modules API</strong> is explicitly designed for building external packages rather than keeping them inside the core application code. In fact, even the Nuxt team <strong>recommends</strong> placing them as packages within a monorepo.</p><p>The same thing goes for <strong><a href="https://nuxt.com/docs/getting-started/layers?ref=vue.house">Layers</a> </strong>- Nuxt&#8217;s approach to micro frontends. These "mini-apps" extend your main Nuxt application and are inherently structured to be packaged separately. Their architecture naturally fits within a monorepo, and they can even be published as <strong>standalone npm packages</strong> if needed.</p><p>By embracing a monorepo setup, you&#8217;re not just organizing your project better - you&#8217;re aligning with Nuxt&#8217;s best practices for scalability and maintainability.</p><div><hr></div><p><strong>Not convinced yet</strong>? Let me introduce you some of the great <strong><a href="https://turbo.build/repo/docs?ref=vue.house">Turborepo</a></strong><a href="https://turbo.build/repo/docs"> </a>capabilities, as it might be the best choice out there to handle monorepos.</p><p>But first - why Turborepo? After all, there are other solid alternatives, right? Well&#8230; not quite. Take <strong><a href="https://lerna.js.org">Lerna</a></strong>. It&#8217;s been around for a long time, well-established in the dev community. But over the years, as technology evolved, its performance didn&#8217;t keep up. Lerna was primarily designed for managing <strong>package-based monorepos</strong>, rather than a mix of packages and real applications. Eventually, it was <strong>abandoned </strong>by its author<strong> </strong>and later acquired by Nx, rewritten with its engine involved. Now, if you check its GitHub repository, you'll notice that <strong>development activity has significantly slowed down </strong>- a bit of a bummer.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.vue.house/?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share&quot;,&quot;text&quot;:&quot;Share vue.house&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.vue.house/?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share"><span>Share vue.house</span></a></p><p>Then there's <strong><a href="https://nx.dev">Nx</a></strong> - a powerful, feature-packed tool. It&#8217;s <strong>huge, advanced, and highly capable</strong>, but it's more <strong>geared toward enterprises</strong> rather than lean startup projects or smaller teams. Not ideal. Finally, there are some tools from MS, and/or Amazon, it&#8217;s hard to think about them seriously since they&#8217;re an internal enterprise solutions. So, where does <strong>Turborepo</strong> fit in? Let&#8217;s see what it brings to the table in comparison.</p><h4><strong>Why you should pick Turborepo?</strong></h4><ol><li><p><strong>Caching</strong>. It has great (quite advanced) caching system that is capable to speed-up development process significantly. Once a task is executed (like building, linting, or testing), the <strong>results are cached</strong>, meaning future runs can be near-instant if nothing has changed. So imagine that you have co-existing packages powering your application (Nuxt module), you don&#8217;t need to build them every time when you&#8217;re building your main app. Turborepo will provide cached already-built packages for your final execution. What&#8217;s more interesting you can even have remote caching, thanks to which packages can be shared with your team. &#10024;</p></li><li><p><strong>Parallel Execution</strong>. You don&#8217;t have to wait for a single process to finish - you can run multiple processes simultaneously. And to avoid getting caught in dependency traps, you have <strong>pipelines</strong> to manage execution efficiently.</p></li><li><p><strong>Pipelines</strong>. You can design pipelines for any part of your development process. Whether it's <strong>building, running apps, or managing packages</strong>, you have full control over execution order. You decide which tasks should run first to provide the necessary resources for other parts of your monorepo.</p></li><li><p><strong>Polymorphic Nature. </strong>Unlike Lerna or Bazel, Turborepo isn&#8217;t just built to manage packages - it&#8217;s designed to <strong>deliver and integrate</strong> those packages directly into your applications, making them the primary source and backbone of your system.</p></li></ol><h4><strong>Historical Outline</strong></h4><p>The project was initiated by <a href="https://x.com/jaredpalmer">Jared Palmer,</a> who identified limitations in existing monorepo ecosystem like Lerna (daa), especially concerning performance and scalability. He aimed to create a tool that could handle complex monorepos with advanced features. Initially, Turborepo was developed using <strong><a href="https://go.dev">Go</a></strong>. However, to leverage performance benefits, the team transitioned to <strong><a href="https://www.rust-lang.org">Rust</a></strong>, resulting in significant improvements in speed and efficiency. In December 2021, shortly after its release, <strong><a href="https://vercel.com?ref=vue.house">Vercel</a></strong> acquired Turborepo, integrating it into their suite of developer tools to enhance performance and scalability for frontend applications.</p><div><hr></div><p>OK. If you&#8217;re still not convinced, maybe you&#8217;ll just give it a quick try? I can promise you that the setup and workspace organization will be fast and easy. Additionally, on top of our <a href="https://www.vue.house/p/nuxt-4-the-first-steps?r=18rvtd">starting guide</a>, you&#8217;ll be ready to go, building with your new and shiny environment on top of Turborepo. Deal? Let&#8217;s go!</p><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;2df78bc2-8d26-476d-acea-2932c3fbdf76&quot;,&quot;caption&quot;:&quot;Hi everyone! Before we jump in, I&#8217;d like to say hello to all of you and thank you for reading. This is the very first post on the vue.house Newsletter, and I hope you&#8217;ll love it and find it both info&#8230;&quot;,&quot;cta&quot;:null,&quot;showBylines&quot;:true,&quot;size&quot;:&quot;sm&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;Nuxt 4: The First Steps &#128640;&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:75204049,&quot;name&quot;:&quot;Lukas Borawski&quot;,&quot;bio&quot;:&quot;Hi, I'm Lukas, an experienced software engineer writing with passion about programming (of course), music, and running. Based in sunny Portugal, I'm also a road cyclist, alternative coffee lover and amateur photographer.&quot;,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/355f95dc-d93f-47db-bb24-99c9efb22ec3_2044x2044.jpeg&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;post_date&quot;:&quot;2025-02-07T14:05:31.360Z&quot;,&quot;cover_image&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b3eb6cfa-cee8-4913-8fdb-30c6a0a8f89d_840x600.png&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://www.vue.house/p/nuxt-4-the-first-steps&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:154776385,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:0,&quot;comment_count&quot;:0,&quot;publication_id&quot;:null,&quot;publication_name&quot;:&quot;vue.house&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1bf903f-0963-44e7-addd-ddfe2251233d_800x800.png&quot;,&quot;belowTheFold&quot;:true,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div><div><hr></div><p>Firstly, let&#8217;s make a <strong>small rearrangement within your root directory</strong>. Create there two new folders: <code>packages/</code> and <code>apps/</code>. Inside <code>apps/</code> create a new one called <code>web/</code> - here will be the best place for your main Nuxt app, so please move it there.</p><p>In the root please leave the <code>.gitignore</code> file, you can add to it turbo-specific folders that will held the cache and configs.</p><pre><code># turborepo specific
.turbo
.history

# pnpm specific
~
~/*</code></pre><p>OK, let&#8217;s initialize the main <code>package.json</code> file. Use <a href="https://pnpm.io/cli/init?ref=vue.house">pnpm</a> for that.</p><pre><code>pnpm init</code></pre><p><code>pnpm</code> will also need to have a <code>workspaces.yaml</code> file to inform Turborepo where you&#8217;re actually storing your apps and packages. Create it inside the root folder and place there this code.</p><pre><code>packages:
  - 'apps/**'
  - 'packages/**'</code></pre><p>Then you need to install the thing. Run this command.</p><pre><code>pnpm add -D turbo</code></pre><p>Now, when the turbo is already installed, it needs a configuration file. Please, inside your root directory create a new file <code>turbo.json</code>. Insert there this content.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!WqmP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95638bb1-3a0f-4a93-aeae-7d0f6e8223ce_1460x1044.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!WqmP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95638bb1-3a0f-4a93-aeae-7d0f6e8223ce_1460x1044.png 424w, https://substackcdn.com/image/fetch/$s_!WqmP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95638bb1-3a0f-4a93-aeae-7d0f6e8223ce_1460x1044.png 848w, https://substackcdn.com/image/fetch/$s_!WqmP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95638bb1-3a0f-4a93-aeae-7d0f6e8223ce_1460x1044.png 1272w, https://substackcdn.com/image/fetch/$s_!WqmP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95638bb1-3a0f-4a93-aeae-7d0f6e8223ce_1460x1044.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!WqmP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95638bb1-3a0f-4a93-aeae-7d0f6e8223ce_1460x1044.png" width="1456" height="1041" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/95638bb1-3a0f-4a93-aeae-7d0f6e8223ce_1460x1044.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1041,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:99274,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!WqmP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95638bb1-3a0f-4a93-aeae-7d0f6e8223ce_1460x1044.png 424w, https://substackcdn.com/image/fetch/$s_!WqmP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95638bb1-3a0f-4a93-aeae-7d0f6e8223ce_1460x1044.png 848w, https://substackcdn.com/image/fetch/$s_!WqmP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95638bb1-3a0f-4a93-aeae-7d0f6e8223ce_1460x1044.png 1272w, https://substackcdn.com/image/fetch/$s_!WqmP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95638bb1-3a0f-4a93-aeae-7d0f6e8223ce_1460x1044.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">turbo.json | <a href="https://gist.githubusercontent.com/lukasborawski/8418b2cb4c6e249f0aea31ab774e88bc/raw/9514cf984a9fc28efd4dec4c645d2959204c6077/turbo.json">Source</a></figcaption></figure></div><p>What we have here? <code>$schema</code> is the internal Turborepo set of configs so you can leave it as it is. Then you have <code>tasks</code> object. This is where you&#8217;re defining your processes and pipelines. Name of tasks should be corresponding with the name of your scripts, so if you&#8217;re using script <code>dev</code> to run your development process define it like that, same for building and/or linting. On top of this Turborepo <strong>will scan all</strong> of your apps and packages for <code>package.json</code> files and will run the dev scripts from them, parallelly. <strong>Each task can have its own pipeline</strong> defined to be processed in the desired way along with the other components of your monorepo. <a href="https://turbo.build/repo/docs/crafting-your-repository/configuring-tasks">Here you can read more</a> about defining it/them step by step.</p><p>By defining <code>outputs</code> you&#8217;re telling Turborepo that should store this exact distribution folder and reuse it within the next execution. You can always <strong><a href="https://turbo.build/repo/docs/reference/run#--force">force the rebuild</a></strong> without/leaving cached resources.</p><p>Now, we need to add these tasks to our main packege.json file.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!IBUn!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd13e50f7-bfc6-43e6-9a8a-1ffa1a453025_1460x688.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!IBUn!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd13e50f7-bfc6-43e6-9a8a-1ffa1a453025_1460x688.png 424w, https://substackcdn.com/image/fetch/$s_!IBUn!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd13e50f7-bfc6-43e6-9a8a-1ffa1a453025_1460x688.png 848w, https://substackcdn.com/image/fetch/$s_!IBUn!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd13e50f7-bfc6-43e6-9a8a-1ffa1a453025_1460x688.png 1272w, https://substackcdn.com/image/fetch/$s_!IBUn!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd13e50f7-bfc6-43e6-9a8a-1ffa1a453025_1460x688.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!IBUn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd13e50f7-bfc6-43e6-9a8a-1ffa1a453025_1460x688.png" width="1456" height="686" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d13e50f7-bfc6-43e6-9a8a-1ffa1a453025_1460x688.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:686,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:72690,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!IBUn!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd13e50f7-bfc6-43e6-9a8a-1ffa1a453025_1460x688.png 424w, https://substackcdn.com/image/fetch/$s_!IBUn!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd13e50f7-bfc6-43e6-9a8a-1ffa1a453025_1460x688.png 848w, https://substackcdn.com/image/fetch/$s_!IBUn!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd13e50f7-bfc6-43e6-9a8a-1ffa1a453025_1460x688.png 1272w, https://substackcdn.com/image/fetch/$s_!IBUn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd13e50f7-bfc6-43e6-9a8a-1ffa1a453025_1460x688.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">package.json</figcaption></figure></div><p><strong>One more thing</strong> that you need to do is to move the <code>lint-staged </code>configuration from the Nuxt folder to the main/root one. Now you&#8217;ll be linting all of the apps and packages within your repository so you have to define how scan them all together. Do it like this.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-ZeD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf2579f2-d9a2-4055-99dc-1f29d1ab0c9a_1460x926.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-ZeD!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf2579f2-d9a2-4055-99dc-1f29d1ab0c9a_1460x926.png 424w, https://substackcdn.com/image/fetch/$s_!-ZeD!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf2579f2-d9a2-4055-99dc-1f29d1ab0c9a_1460x926.png 848w, https://substackcdn.com/image/fetch/$s_!-ZeD!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf2579f2-d9a2-4055-99dc-1f29d1ab0c9a_1460x926.png 1272w, https://substackcdn.com/image/fetch/$s_!-ZeD!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf2579f2-d9a2-4055-99dc-1f29d1ab0c9a_1460x926.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-ZeD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf2579f2-d9a2-4055-99dc-1f29d1ab0c9a_1460x926.png" width="1456" height="923" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cf2579f2-d9a2-4055-99dc-1f29d1ab0c9a_1460x926.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:923,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:104728,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!-ZeD!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf2579f2-d9a2-4055-99dc-1f29d1ab0c9a_1460x926.png 424w, https://substackcdn.com/image/fetch/$s_!-ZeD!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf2579f2-d9a2-4055-99dc-1f29d1ab0c9a_1460x926.png 848w, https://substackcdn.com/image/fetch/$s_!-ZeD!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf2579f2-d9a2-4055-99dc-1f29d1ab0c9a_1460x926.png 1272w, https://substackcdn.com/image/fetch/$s_!-ZeD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf2579f2-d9a2-4055-99dc-1f29d1ab0c9a_1460x926.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">package.json</figcaption></figure></div><p>Alright, I believe you can test it now. In your root directory run this command.</p><pre><code>pnpm run dev</code></pre><p>What you&#8217;ll see it will be a Nuxt app process running straight from the main scope.</p><pre><code>yourmonorepo/web:dev: Nuxt 3.15.4 with Nitro 2.10.4</code></pre><p>Awesome! <strong>You now have </strong><code>yourmonorepo</code> (scope name, the name of your main package, please change it)<strong> </strong>with Turborepo ready and going. Along the way, while we will develop our codebase adding a new apps and packages we will be extending Turbo configuration and how it behaves. If you don&#8217;t want to miss any of the future publications <strong>please subscribe to stay up to date</strong>.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.vue.house/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.vue.house/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><p>Last but not least what we can do here - it can be a great reference for the further improvements - will be creation of a global config for ESLint. Interested?</p><p>Inside your <code>packages/</code> folder create a new one: <code>config/</code>, and inside of it add a new one named <code>eslint/</code>. Now we need to initialize a new package configuration. Run the <code>pnpm init</code> command. New <code>package.json</code> file will be created. Inside you can define something like this.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!UG4E!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc4e9bc2-976c-4d6f-b039-55f837bf6cce_1460x926.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!UG4E!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc4e9bc2-976c-4d6f-b039-55f837bf6cce_1460x926.png 424w, https://substackcdn.com/image/fetch/$s_!UG4E!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc4e9bc2-976c-4d6f-b039-55f837bf6cce_1460x926.png 848w, https://substackcdn.com/image/fetch/$s_!UG4E!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc4e9bc2-976c-4d6f-b039-55f837bf6cce_1460x926.png 1272w, https://substackcdn.com/image/fetch/$s_!UG4E!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc4e9bc2-976c-4d6f-b039-55f837bf6cce_1460x926.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!UG4E!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc4e9bc2-976c-4d6f-b039-55f837bf6cce_1460x926.png" width="1456" height="923" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cc4e9bc2-976c-4d6f-b039-55f837bf6cce_1460x926.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:923,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:103080,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!UG4E!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc4e9bc2-976c-4d6f-b039-55f837bf6cce_1460x926.png 424w, https://substackcdn.com/image/fetch/$s_!UG4E!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc4e9bc2-976c-4d6f-b039-55f837bf6cce_1460x926.png 848w, https://substackcdn.com/image/fetch/$s_!UG4E!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc4e9bc2-976c-4d6f-b039-55f837bf6cce_1460x926.png 1272w, https://substackcdn.com/image/fetch/$s_!UG4E!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc4e9bc2-976c-4d6f-b039-55f837bf6cce_1460x926.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">packages/config/eslint/package.json</figcaption></figure></div><p>OK, as you can see we&#8217;re referring here to the <code>index.base.mjs</code> file. We don&#8217;t have it so let&#8217;s create one. Inside newly created please add this content.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!pHa-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83192b03-778a-494b-abcc-7caf7029f0e9_1460x628.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!pHa-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83192b03-778a-494b-abcc-7caf7029f0e9_1460x628.png 424w, https://substackcdn.com/image/fetch/$s_!pHa-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83192b03-778a-494b-abcc-7caf7029f0e9_1460x628.png 848w, https://substackcdn.com/image/fetch/$s_!pHa-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83192b03-778a-494b-abcc-7caf7029f0e9_1460x628.png 1272w, https://substackcdn.com/image/fetch/$s_!pHa-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83192b03-778a-494b-abcc-7caf7029f0e9_1460x628.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!pHa-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83192b03-778a-494b-abcc-7caf7029f0e9_1460x628.png" width="1456" height="626" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/83192b03-778a-494b-abcc-7caf7029f0e9_1460x628.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:626,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:69663,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!pHa-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83192b03-778a-494b-abcc-7caf7029f0e9_1460x628.png 424w, https://substackcdn.com/image/fetch/$s_!pHa-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83192b03-778a-494b-abcc-7caf7029f0e9_1460x628.png 848w, https://substackcdn.com/image/fetch/$s_!pHa-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83192b03-778a-494b-abcc-7caf7029f0e9_1460x628.png 1272w, https://substackcdn.com/image/fetch/$s_!pHa-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83192b03-778a-494b-abcc-7caf7029f0e9_1460x628.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">packages/config/eslint/index.base.mjs</figcaption></figure></div><p>You&#8217;ll notice that it&#8217;s <a href="https://www.vue.house/i/154776385/linter-and-prettier">almost the same config</a> that we&#8217;ve had for our Nuxt application. That&#8217;s right, <strong>we&#8217;re globalizing it</strong> so common parts were moved.</p><p>Additionally, from the Nuxt package please move the dependencies defined within the <code>devDependencies</code> from the <code>package.json</code> file that you see above. From now one the <code>eslint-config</code> package will be installing them.</p><p>Great, we have a new, global package with <strong>ESLint config that we can now share across the whole repository</strong>. So let&#8217;s proceed and install it for our Nuxt application. Inside the <code>apps/web/package.json</code> file add this notation to your <code>devDependencies</code> object.</p><pre><code>"@yourmonorepo/eslint-config": "1.0.0",</code></pre><p>You may also add <code>workspace:*</code> instead of the version number, but while publishing the package to the remote catalog you will get issues since this will be an internal (workspace) package.</p><p>Now, we need some small edits around the Nuxt&#8217;s app ESLint config.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!GcV4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48ca617a-202b-4175-89ea-b94c61b4939a_1460x748.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!GcV4!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48ca617a-202b-4175-89ea-b94c61b4939a_1460x748.png 424w, https://substackcdn.com/image/fetch/$s_!GcV4!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48ca617a-202b-4175-89ea-b94c61b4939a_1460x748.png 848w, https://substackcdn.com/image/fetch/$s_!GcV4!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48ca617a-202b-4175-89ea-b94c61b4939a_1460x748.png 1272w, https://substackcdn.com/image/fetch/$s_!GcV4!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48ca617a-202b-4175-89ea-b94c61b4939a_1460x748.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!GcV4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48ca617a-202b-4175-89ea-b94c61b4939a_1460x748.png" width="1456" height="746" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/48ca617a-202b-4175-89ea-b94c61b4939a_1460x748.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:746,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:112781,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!GcV4!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48ca617a-202b-4175-89ea-b94c61b4939a_1460x748.png 424w, https://substackcdn.com/image/fetch/$s_!GcV4!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48ca617a-202b-4175-89ea-b94c61b4939a_1460x748.png 848w, https://substackcdn.com/image/fetch/$s_!GcV4!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48ca617a-202b-4175-89ea-b94c61b4939a_1460x748.png 1272w, https://substackcdn.com/image/fetch/$s_!GcV4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48ca617a-202b-4175-89ea-b94c61b4939a_1460x748.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">apps/web/eslint.config.mjs</figcaption></figure></div><p>As you can see <strong>almost everything remains the same</strong>, the only one difference is that now we&#8217;re importing the <code>eslintBaseConfig</code> from our global ESLint config package, finally extending it with our Nuxt-specific rules. Imagine that for <strong>every future app created inside our repository</strong> we will be able to do the same thing, never struggling with different ESLint rules. Perfect!</p><p>Two more things. Change this inside your main <code>package.json</code> file.</p><pre><code>{
  "lint-staged": {
    "*.*": "turbo lint --"
  },
}</code></pre><p>Because we&#8217;re defining locally per project which kind of files we went to scan it&#8217;s not needed anymore to determinate it along for the <code>lint-staged</code> proces. I stumble upon the issue of analyzing files as a tasks by Turborepo. To avoid this problem please add <code>&#8212;-</code> to your <code>turbo lint</code> command, this should resolve the issue.</p><div><hr></div><p>That&#8217;s it! N<strong>ow you can proceed with the other configs</strong> like Prettier or future-added Tailwind, or any other that you&#8217;ll be sharing across the repository. </p><p>What&#8217;s next? <strong>Docs, we need docs</strong>! Why? Check out the next post to learn more. And <strong>to not miss any please subscribe to this publication</strong>. Thanks and enjoy, Lukas.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.vue.house/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.vue.house/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;b0a96749-29a1-4ef0-94c1-84e0328feafd&quot;,&quot;caption&quot;:&quot;What you&#8217;ll learn from this series?&quot;,&quot;cta&quot;:null,&quot;showBylines&quot;:true,&quot;size&quot;:&quot;sm&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;Docs with Nuxt Content&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:75204049,&quot;name&quot;:&quot;Lukas Borawski&quot;,&quot;bio&quot;:&quot;Hi, I'm Lukas, an experienced software engineer writing with passion about programming (of course), music, and running. Based in sunny Portugal, I'm also a road cyclist, alternative coffee lover and amateur photographer.&quot;,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/355f95dc-d93f-47db-bb24-99c9efb22ec3_2044x2044.jpeg&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;post_date&quot;:&quot;2025-02-14T19:20:53.439Z&quot;,&quot;cover_image&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3fc7e44b-e198-4b24-a00f-aee62c2ffdbe_840x600.png&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://www.vue.house/p/docs-with-nuxt-content&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:156920388,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:0,&quot;comment_count&quot;:0,&quot;publication_id&quot;:null,&quot;publication_name&quot;:&quot;vue.house&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1bf903f-0963-44e7-addd-ddfe2251233d_800x800.png&quot;,&quot;belowTheFold&quot;:true,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div><div><hr></div><p>Please <strong>let me know how you find this article</strong>. What I can improve?</p><div class="poll-embed" data-attrs="{&quot;id&quot;:270897}" data-component-name="PollToDOM"></div><p></p>]]></content:encoded></item><item><title><![CDATA[Nuxt 4 First Steps 🚀]]></title><description><![CDATA[Your ultimate and extensive guide on how to start with the latest and greatest version of Nuxt.js]]></description><link>https://www.vue.house/p/nuxt-4-the-first-steps</link><guid isPermaLink="false">https://www.vue.house/p/nuxt-4-the-first-steps</guid><dc:creator><![CDATA[Lukas Borawski]]></dc:creator><pubDate>Fri, 07 Feb 2025 14:05:31 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/b3eb6cfa-cee8-4913-8fdb-30c6a0a8f89d_840x600.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Hi everyone! Before we jump in, I&#8217;d like to <strong>say hello</strong> to all of you and thank you for reading. This is the very first post on the <strong>vue.house Newsletter</strong>, and I hope you&#8217;ll love it and find it both informative and insightful. If you&#8217;re interested, you can read a few more words about me and this publication on the <a href="https://vue.house/n/about">about page</a>. Enjoy!</p><div><hr></div><h3>Before Start</h3><p>I'm planning to write a <strong>series of articles on how to plan, design, and build</strong> applications with <strong><a href="https://vuejs.org?ref=vue.house">Vue</a></strong> &amp; <strong><a href="https://nuxt.com?ref=vue.house">Nuxt</a></strong> - you may think about them as a comprehensive course or seminary. I'll be covering all the features, gradually breaking them down one by one - starting with the basics, showing how they work, and demonstrating how to use them effectively within the ecosystem. As we progress, I'll dive into advanced techniques and optimizations, equipping you with the knowledge to build highly efficient and powerful web applications.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.vue.house/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption"><strong>Don&#8217;t miss any of new posts</strong>. It&#8217;s free, no account or registration needed. Just <strong>leave your email address</strong>. You&#8217;ll not regret. Promise!</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p><strong>Don't worry if something isn't covered right away</strong> - this journey is designed to build up your understanding step by step. Along with exploring specific parts of the framework, I'll also explain why they were built, what problems they solve, and how they fit into the bigger picture. By the end, you'll have a solid grasp of Vue &amp; Nuxt, from the fundamentals to the most advanced techniques. </p><p>My <strong>only one request</strong> to you is simple - if you spot anything incorrect, outdated, or unclear, please let me know. Software evolves constantly, and some parts of this publication might become misleading over time. So don&#8217;t hesitate - <a href="https://www.vue.house/about#&#167;lets-connect">reach out to me right away</a>. I truly appreciate your feedback in keeping this content accurate and valuable. Thanks in advance, Lukas! &#128640;</p><p>Last but not least - <strong>my take on AI</strong>. No doubt, you can work and learn with any leading GPT. However, I believe that truly understanding the context, seeing how everything connects, and learning without feeling overwhelmed requires proper &#8220;protein guidance&#8221;. AI can be a powerful tool, but it might not always provide the clarity and structured learning path that an experienced mentor can. Still, I&#8217;m just a human. &#128517;</p><p>Additionally, <a href="https://www.vue.house/p/coding-guidelines">here you can read the coding guide</a>, for better understanding the way and standards of how we will be approaching various things here.</p><h3>Let&#8217;s Start</h3><p>Alright, let&#8217;s dive into the main topic.</p><p><strong><a href="https://nuxt.com?ref=vue.house">Nuxt</a></strong> 4? Wait a minute - <strong>it&#8217;s not even released yet</strong>, and there isn&#8217;t an official release date anywhere&#8230; Right, that&#8217;s true. But since the new, highly anticipated version of this popular <strong><a href="https://vuejs.org?ref=vue.house">Vue</a></strong> framework (as repeatedly announced) won&#8217;t be a major breaking change, it&#8217;s fair to say it&#8217;s almost here - and we can start introducing it. Even using it. </p><p>However, to be completely honest, this article will focus primarily on the first steps of Nuxt 3, along with some of the additional capabilities you can expect in/from the next version. It&#8217;s also worth mentioning that if you already have built application in Nuxt 3 <strong>you can easily switch to the new version</strong>, couple simple edits would be required tho.</p><p>OK, but what are we waiting for? Couple of things actually. First of all there must be a new version of <strong><a href="https://nitro.build?ref=vue.house">Nitro</a></strong> released. Some of you might ask, what da heck is Nitro? </p><div><hr></div><h4><strong>&#9888;&#65039; Disclaimer</strong></h4><p>I think it&#8217;s really important to understand how the technology works - not just its APIs, primitives<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a>, and abstractions<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a>, but also what&#8217;s under the hood. This makes it easier to see how certain things work and how to approach them if we ever need to dig a bit deeper. Or if AI will stuck somewhere&#8230; So, from time to time, I&#8217;ll try to do that: dive deeper to show you how everything fits together. I hope this will be helpful.</p><div><hr></div><p>Nitro... Nitro is a server-dedicated toolchain/framework built for <strong><a href="https://h3.unjs.io?ref=vue.house">H3</a></strong>. &#128540; Dude, c&#8217;mon, what&#8217;s H3 now?! Stick with me here - so if you know <a href="https://expressjs.com?ref=vue.house">Express.js</a>, you'll see that H3 is essentially a similar framework for building a web server architectures. The key difference? H3 is a minimal wrapper around the Node and Web APIs, along with dedicated adapters. It offers a simpler, more intuitive interface with dedicated helpers and/or macro functions<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a> to define instances, events, and routes. Plus, it's built with <strong><a href="https://www.typescriptlang.org?ref=vue.house">TypeScript</a></strong>, so you get that type safety and an awesome development experience. Although, as mentioned before H3 is a really small framework focused only on essentials. Now, Nitro provides additional abstraction to build these web servers with ease. It comes with predefined configurations, dedicated directory structure, planty of utilities and integrations. </p><p>And for those working with Nuxt? Nitro's here as well. It means that when you&#8217;re creating your server APIs within the Nuxt&#8217;s <a href="https://nuxt.com/docs/guide/directory-structure/server?ref=vue.house">application structure</a> you&#8217;re doing it using Nitro (with H3) as a backbone. OK, but this is just a context, to realize the current state better. And to align the position in which Nuxt currently is it&#8217;s really important to mention <a href="https://github.com/nitrojs/nitro/pull/2521?ref=vue.house">this PR</a> that we&#8217;re waiting for. Accordingly, some (not much) but important <a href="https://github.com/nitrojs/nitro/pull/2521#issue-2351330826">things left</a> to be delivered. And as Nitro&#8217;s an integral piece of the Nuxt&#8217;s architecture it must be well finished and released just before. The great message here is that <strong>it&#8217;s not stopping us</strong>, we can still play with upcoming Nuxt 4 APIs while still using some old internals. Finally, migrating to the newest version should be (as authors claimed) should be easy and straightforward.</p><p>While you're reading this, the <strong>code and product are free and open-source</strong>. The authors are working pro bono for the community, so if you&#8217;d like to speed things up and join the movement, you can always contribute and help close issues faster. Go!</p><p>Hope to write a quick update soon. &#9786;&#65039;</p><h3>Installation</h3><p>Here you will find the installation guide for the current Nuxt (3) version along with the instruction on how to enable the new one (4). It&#8217;s a matter of simple configuration, so let&#8217;s dive into it. </p><p>In your terminal use this command.</p><pre><code>npx nuxi@latest init [project-name] </code></pre><p>To not copy this just like that, soulless, we could check what&#8217;s going on here - I believe for some of you it might be quite informative. Quick reminder here: I&#8217;ll be approaching stuff that way, helping you to understand more, <a href="https://www.vue.house/p/e7591715-4ba6-41e0-86cf-ea49865f59c4?updated=2025-02-04T17%3A04%3A06.203Z&amp;postPreview=paid&amp;sub=paid&amp;device=desktop&amp;audience=only_paid&amp;free_preview=false&amp;freemail=#%C2%A7disclaimer">as mentioned above</a>. </p><p>OK, let&#8217;s back to the code. What we have here is a command to call <code>npx</code> - the <strong>Node Package Execute (runner)</strong>. It&#8217;s included with <code>npm</code> that you&#8217;re using to manage and install packages within your Node applications. <code>npx</code> is able to execute packages without even having them installed before. So using it makes the flow much seamless, both for user to get, and for the packages authors to deliver them to end user. <strong><a href="https://yarnpkg.com">Yarn</a></strong> and <strong><a href="https://pnpm.io">PNPM</a></strong> will use dlx tool to do the same thing.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.vue.house/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption"><strong>Subscribe</strong> to get <strong>email-only</strong>, weekly updates with a list of <strong>Vue, Nuxt &amp; Tech</strong> news, updates and resources. It&#8217;s free! Just leave your email.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p>Now, <code>npx</code> is calling <code>nuxi, </code>the <strong>official Nuxt&#8217;s CLI</strong><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-4" href="#footnote-4" target="_self">4</a> tool able to setup, upgrade, extend or even clean your Nuxt project. Here, we&#8217;re (init)ializing a new one, inside a new folder that the name we will provide for it - replace <code>[project-name]</code> with your project name. You can also initialize the new project inside existing directory, to do so you need to use this command.</p><pre><code>npx nuxi@latest init</code></pre><p>Just after <code>nuxi </code>will ask you if it should overwrite the existing folder contents or maybe create a new one. Then you will be able to select what kind of package manager you&#8217;ll be using, accordingly to <a href="https://www.vue.house/p/coding-guidelines">our code guidelines</a> we&#8217;ll stick to the <code>pnpm</code>. However, you can always run it with your desired package manager.</p><div><hr></div><h4><strong>&#128161; Interesting Fact</strong></h4><p>I'm always amazed by how vast the Nuxt ecosystem is. Take <strong><a href="https://github.com/nuxt/cli">nuxi</a></strong>, for example - it's built on top of <strong><a href="https://github.com/unjs/citty">citty</a></strong>, an <strong><a href="https://github.com/unjs">unjs</a></strong> CLI builder (unjs being a collection of Nuxt community-driven <a href="https://unjs.io/packages?q=&amp;order=1&amp;orderBy=title&amp;ref=vue.house">projects</a> that provide agnostic libraries for building high-performance JavaScript applications).</p><p>This is just one of many examples of how interconnected and well-structured the Nuxt ecosystem is. Throughout this series, I'll systematically unpack these tools, showing you how various internal components come together to complement the entire Nuxt ecosystem and its extended family.</p><div><hr></div><p>At the end CLI will ask you if you want to establish a new <strong><a href="https://git-scm.com">git</a></strong> project, you can decide on that and let the process to finish by installing all of the dependencies.</p><p>What you&#8217;ll get will be this structure.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!axPx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa38ce7e8-8af7-4604-9402-1668c06b70ec_1460x806.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!axPx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa38ce7e8-8af7-4604-9402-1668c06b70ec_1460x806.png 424w, https://substackcdn.com/image/fetch/$s_!axPx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa38ce7e8-8af7-4604-9402-1668c06b70ec_1460x806.png 848w, https://substackcdn.com/image/fetch/$s_!axPx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa38ce7e8-8af7-4604-9402-1668c06b70ec_1460x806.png 1272w, https://substackcdn.com/image/fetch/$s_!axPx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa38ce7e8-8af7-4604-9402-1668c06b70ec_1460x806.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!axPx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa38ce7e8-8af7-4604-9402-1668c06b70ec_1460x806.png" width="1456" height="804" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a38ce7e8-8af7-4604-9402-1668c06b70ec_1460x806.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:804,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:95323,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!axPx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa38ce7e8-8af7-4604-9402-1668c06b70ec_1460x806.png 424w, https://substackcdn.com/image/fetch/$s_!axPx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa38ce7e8-8af7-4604-9402-1668c06b70ec_1460x806.png 848w, https://substackcdn.com/image/fetch/$s_!axPx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa38ce7e8-8af7-4604-9402-1668c06b70ec_1460x806.png 1272w, https://substackcdn.com/image/fetch/$s_!axPx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa38ce7e8-8af7-4604-9402-1668c06b70ec_1460x806.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Nuxt 3 Directory Structure</figcaption></figure></div><p>Alright. If you've worked with Nuxt 2 before, you'll notice that the structure in Nuxt 3 is quite different&#8212;more minimalistic. Gone are the numerous folders with README files explaining what each one does.</p><p>The &#8220;new&#8221; (well, not so new anymore) Nuxt approach is all about <strong>progressive enhancement</strong> - your app grows organically as your development process unfolds. And that&#8217;s exactly how we&#8217;ll approach it here. This way, you won&#8217;t be overwhelmed by a complex, pre-defined structure or find yourself stuck wondering what to do next. Instead, you&#8217;ll build up your app step by step, naturally understanding how everything fits together.</p><p><strong>Two things here</strong>. The rest I&#8217;ll describe in a minute.</p><ol><li><p><code>.nuxt/ </code>folder - auto-generated folder that has all of the Nuxt internals. Don&#8217;t remove this one, it&#8217;s important for your application to work properly.</p></li><li><p><code>app.vue</code> component - your application entry point, the place where your code &#8220;begins&#8221;. Inside you&#8217;ll find some of the Nuxt Welcome Page &#8220;native", pre-added components.</p></li></ol><p>OK, now is the perfect moment when we can make these significant few steps entering into the <strong>Nuxt 4</strong> world.</p><ol><li><p>In your <code>nuxt.config.ts </code>file add <code>future.compatibilityVersion</code> property and set it to <code>4</code> (<code>number</code>)<code>.</code></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!E34G!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ef075cc-d54a-486f-8202-93b9568b6327_1460x450.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!E34G!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ef075cc-d54a-486f-8202-93b9568b6327_1460x450.png 424w, https://substackcdn.com/image/fetch/$s_!E34G!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ef075cc-d54a-486f-8202-93b9568b6327_1460x450.png 848w, https://substackcdn.com/image/fetch/$s_!E34G!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ef075cc-d54a-486f-8202-93b9568b6327_1460x450.png 1272w, https://substackcdn.com/image/fetch/$s_!E34G!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ef075cc-d54a-486f-8202-93b9568b6327_1460x450.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!E34G!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ef075cc-d54a-486f-8202-93b9568b6327_1460x450.png" width="1456" height="449" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3ef075cc-d54a-486f-8202-93b9568b6327_1460x450.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:449,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:44267,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!E34G!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ef075cc-d54a-486f-8202-93b9568b6327_1460x450.png 424w, https://substackcdn.com/image/fetch/$s_!E34G!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ef075cc-d54a-486f-8202-93b9568b6327_1460x450.png 848w, https://substackcdn.com/image/fetch/$s_!E34G!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ef075cc-d54a-486f-8202-93b9568b6327_1460x450.png 1272w, https://substackcdn.com/image/fetch/$s_!E34G!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ef075cc-d54a-486f-8202-93b9568b6327_1460x450.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">nuxt.config.ts | Enabling Nuxt 4 Compatibility</figcaption></figure></div><p>Thanks to this &#8220;flag&#8221; your application will be able to use all the new features and opted-in enhancements coming straight from the Nuxt 4 version. The <code>future</code> object is meant to be a container for futures that become a default ones. There is one more similar object called <code>experimental </code> with which you can enable these new and potential features, it&#8217;s not set in stone tho that they will finally land within the stable major/minor release.</p></li><li><p>Introduce a new directory structure - a simple rotation. However, if the structure of your application&#8217;s more mature than this simple initial one you don&#8217;t need to make these changes at any cost. Nuxt will detect the old arrangement and will adopt to it, still delivering new features.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!WJ1z!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa980e1f0-a94b-46c6-842d-75f7982b2c52_1460x866.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!WJ1z!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa980e1f0-a94b-46c6-842d-75f7982b2c52_1460x866.png 424w, https://substackcdn.com/image/fetch/$s_!WJ1z!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa980e1f0-a94b-46c6-842d-75f7982b2c52_1460x866.png 848w, https://substackcdn.com/image/fetch/$s_!WJ1z!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa980e1f0-a94b-46c6-842d-75f7982b2c52_1460x866.png 1272w, https://substackcdn.com/image/fetch/$s_!WJ1z!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa980e1f0-a94b-46c6-842d-75f7982b2c52_1460x866.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!WJ1z!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa980e1f0-a94b-46c6-842d-75f7982b2c52_1460x866.png" width="1456" height="864" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a980e1f0-a94b-46c6-842d-75f7982b2c52_1460x866.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:864,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:101985,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!WJ1z!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa980e1f0-a94b-46c6-842d-75f7982b2c52_1460x866.png 424w, https://substackcdn.com/image/fetch/$s_!WJ1z!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa980e1f0-a94b-46c6-842d-75f7982b2c52_1460x866.png 848w, https://substackcdn.com/image/fetch/$s_!WJ1z!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa980e1f0-a94b-46c6-842d-75f7982b2c52_1460x866.png 1272w, https://substackcdn.com/image/fetch/$s_!WJ1z!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa980e1f0-a94b-46c6-842d-75f7982b2c52_1460x866.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Nuxt 4 Directory Structure</figcaption></figure></div><p>OK, let me unpack this: </p><ul><li><p>There is a new <code>app</code> directory, it&#8217;s now a new source one (<code>srcDir</code>), this means that <strong>everything outside of this folder is a part of the root</strong> (<code>rootDir</code>).</p></li><li><p>Folders like (if you have them) <code>layers</code>, <code>modules</code> or <code>public</code> will be now relatively resolved to the <code>rootDir</code> path.</p></li><li><p>Historically, Nuxt wasn&#8217;t designed for building full-fledged client/backend applications with APIs. The <code>server/</code> folder was gradually introduced as the framework evolved to accommodate growing backend needs. However, as internal backend applications expanded, developers faced challenges managing the distinct client and server contexts. Now, with Nuxt 3, this new folder structure contributes to a <strong>more seamless and powerful development flow</strong>. And what&#8217;s exciting is that we&#8217;ll be diving into this as well - going far beyond traditional SPA development and exploring how Nuxt can be used to build full-stack applications.</p></li><li><p><code>server/</code> (backend API) folder has now fully autonomous context along with dedicated TS configuration that you can manage from its dedicated <code>tsconfig.json</code> file.</p></li></ul></li></ol><p>Now, the <strong>important note:</strong> Since we're starting a brand-new application, further changes may be introduced as we progress through development. However, if you're migrating from an older version (3) with an advanced and extensive project structure, I highly recommend following the <strong><a href="https://nuxt.com/docs/getting-started/upgrade#migrating-to-nuxt-4">official migration guide</a></strong> provided by the Nuxt team. There are some significant changes you&#8217;ll need to address to ensure your application runs smoothly and fully benefits from the <strong>new Nuxt 4 features.</strong></p><p>Some of them, which worth put attention to:</p><ul><li><p><a href="https://nuxt.com/docs/getting-started/upgrade#normalized-component-names?ref=vue.house">normalized components name</a>,</p></li><li><p><a href="https://nuxt.com/docs/getting-started/upgrade#more-granular-inline-styles?ref=vue.house">inline styles granularity</a>, </p></li><li><p><a href="https://nuxt.com/docs/getting-started/upgrade#shared-prerender-data?ref=vue.house">sharing prerendered data</a> - this one is powerful new feature, very anticipated, introduced recently as an experimental feature, in nutshell it allows to use prefetched data across the different pages, one important thing here might be to use dedicated to data keys while retrieving it from the store (will introduce it later).</p></li></ul><p>That&#8217;s it. The rest have (or should have) minimal impact on your codebase, should be as well resolved automatically along with the Nuxt&#8217;s internal logic.</p><h3>Further Steps</h3><p>Time to move on and start building some <strong>sexy stuff</strong>. &#128540; Let&#8217;s dive into the next steps, which are crucial from an overall application development perspective. Some of these decisions might have a <strong>big impact down the line</strong>, so let's make them wisely!</p><p>Hey, but first fire your app dude! Run this command.</p><pre><code>pnpm run dev</code></pre><p>You should see something like this.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6kWR!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd176738-1383-4dbe-a878-c9f2e5c7c04e_1460x628.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6kWR!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd176738-1383-4dbe-a878-c9f2e5c7c04e_1460x628.png 424w, https://substackcdn.com/image/fetch/$s_!6kWR!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd176738-1383-4dbe-a878-c9f2e5c7c04e_1460x628.png 848w, https://substackcdn.com/image/fetch/$s_!6kWR!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd176738-1383-4dbe-a878-c9f2e5c7c04e_1460x628.png 1272w, https://substackcdn.com/image/fetch/$s_!6kWR!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd176738-1383-4dbe-a878-c9f2e5c7c04e_1460x628.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6kWR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd176738-1383-4dbe-a878-c9f2e5c7c04e_1460x628.png" width="1456" height="626" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fd176738-1383-4dbe-a878-c9f2e5c7c04e_1460x628.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:626,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:75775,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!6kWR!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd176738-1383-4dbe-a878-c9f2e5c7c04e_1460x628.png 424w, https://substackcdn.com/image/fetch/$s_!6kWR!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd176738-1383-4dbe-a878-c9f2e5c7c04e_1460x628.png 848w, https://substackcdn.com/image/fetch/$s_!6kWR!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd176738-1383-4dbe-a878-c9f2e5c7c04e_1460x628.png 1272w, https://substackcdn.com/image/fetch/$s_!6kWR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd176738-1383-4dbe-a878-c9f2e5c7c04e_1460x628.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>As you can see your app will be running as a Nuxt 3 one, however all the compatible features with version 4 will be enabled. That&#8217;s what we exactly want for the moment. </p><h4><strong>Web App Configuration</strong></h4><p>Now that we have a slightly different directory structure and our web app is separated from the server, we might need some <strong>dedicated configuration</strong> for the client side. Fortunately, Nuxt already provides this feature through the <code>app.config.ts</code> file. It&#8217;s important to understand that <code>app.config.ts</code><strong> is not an extension or replacement for </strong><code>nuxt.config.ts</code>. Instead, it is meant to be used <strong>at build time</strong> and should only contain <strong>public data</strong> - it does <strong>not</strong> have access to environment variables and <strong>should never store sensitive information</strong>. For managing environment-specific configurations securely, we use <code>runtimeConfig</code> inside <code>nuxt.config.ts</code>, which allows access to values that need to remain private or change at runtime. </p><p>OK, let&#8217;s add this file, although let&#8217;s leave it empty for now.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!oGD8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdbc4b76f-db47-4f9e-9cf8-af57543882e9_1460x330.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!oGD8!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdbc4b76f-db47-4f9e-9cf8-af57543882e9_1460x330.png 424w, https://substackcdn.com/image/fetch/$s_!oGD8!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdbc4b76f-db47-4f9e-9cf8-af57543882e9_1460x330.png 848w, https://substackcdn.com/image/fetch/$s_!oGD8!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdbc4b76f-db47-4f9e-9cf8-af57543882e9_1460x330.png 1272w, https://substackcdn.com/image/fetch/$s_!oGD8!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdbc4b76f-db47-4f9e-9cf8-af57543882e9_1460x330.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!oGD8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdbc4b76f-db47-4f9e-9cf8-af57543882e9_1460x330.png" width="1456" height="329" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/dbc4b76f-db47-4f9e-9cf8-af57543882e9_1460x330.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:329,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:36833,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!oGD8!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdbc4b76f-db47-4f9e-9cf8-af57543882e9_1460x330.png 424w, https://substackcdn.com/image/fetch/$s_!oGD8!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdbc4b76f-db47-4f9e-9cf8-af57543882e9_1460x330.png 848w, https://substackcdn.com/image/fetch/$s_!oGD8!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdbc4b76f-db47-4f9e-9cf8-af57543882e9_1460x330.png 1272w, https://substackcdn.com/image/fetch/$s_!oGD8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdbc4b76f-db47-4f9e-9cf8-af57543882e9_1460x330.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">app/app.config.ts</figcaption></figure></div><p>Two additional things - to keep in mind but don&#8217;t overthink them just yet. First, you can add types for both the input and output of the configuration by extending the <code>AppConfigInput</code> interface inside the <code>index.d.ts</code> file. Second, the <code>app.config.ts</code> file can be <strong>merged</strong> with other <code>app.config.ts</code> files within Nuxt layers - if you define them and use a special <a href="https://nuxt.com/docs/guide/directory-structure/app-config#merging-strategy?ref=vue.house">merging function</a>. As we progress with development, we&#8217;ll explore these features in practice, extending and using them as needed.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.vue.house/?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share&quot;,&quot;text&quot;:&quot;Share vue.house&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.vue.house/?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share"><span>Share vue.house</span></a></p><p>Finally, If you want to reach data from that app config you can use built-in composable called <code>useAppConfig()</code>. It will provide you an reactive object with predefined configuration. Call it whenever (any component) you need to get access to app configuration. Important addition may be that it&#8217;s available both for server, and client side.</p><pre><code>const appConfig = useAppConfig()</code></pre><h4><strong>Pages</strong></h4><p>Nuxt automatically generates routes based on the <code>pages/</code> folder structure. While it still uses <strong><a href="https://router.vuejs.org/">vue-router</a></strong> under the hood, Nuxt simplifies the process by eliminating the need to manually define route objects or extensive router configurations. However, if you want more control, you can define routes manually. To do this, create a <code>router.options.ts</code> file inside your <code>app/</code> directory. Within this file, you can set custom rules for your routes, something like this.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!BPgi!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b101600-8f5a-49e1-862a-1fdd713583ed_1460x806.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!BPgi!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b101600-8f5a-49e1-862a-1fdd713583ed_1460x806.png 424w, https://substackcdn.com/image/fetch/$s_!BPgi!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b101600-8f5a-49e1-862a-1fdd713583ed_1460x806.png 848w, https://substackcdn.com/image/fetch/$s_!BPgi!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b101600-8f5a-49e1-862a-1fdd713583ed_1460x806.png 1272w, https://substackcdn.com/image/fetch/$s_!BPgi!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b101600-8f5a-49e1-862a-1fdd713583ed_1460x806.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!BPgi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b101600-8f5a-49e1-862a-1fdd713583ed_1460x806.png" width="1456" height="804" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0b101600-8f5a-49e1-862a-1fdd713583ed_1460x806.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:804,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:94947,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!BPgi!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b101600-8f5a-49e1-862a-1fdd713583ed_1460x806.png 424w, https://substackcdn.com/image/fetch/$s_!BPgi!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b101600-8f5a-49e1-862a-1fdd713583ed_1460x806.png 848w, https://substackcdn.com/image/fetch/$s_!BPgi!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b101600-8f5a-49e1-862a-1fdd713583ed_1460x806.png 1272w, https://substackcdn.com/image/fetch/$s_!BPgi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b101600-8f5a-49e1-862a-1fdd713583ed_1460x806.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">app/router.options.ts</figcaption></figure></div><p>It's also important to note that if you <strong>don&#8217;t</strong> provide a <code>pages/</code> folder, Nuxt will <strong>not</strong> include vue-router by default. In this case, your application will rely on a single entry point: the <code>app.vue</code> component inside the <code>app/ </code>directory.</p><p>However, let&#8217;s assume you choose the default approach and create a <code>pages/ </code>folder. This way, Nuxt will automatically generate your routes, making navigation effortless while keeping your project structured and scalable. From that state you have two path that you can go with.</p><ol><li><p>Leaving the <code>app.vue</code> component as an application entry point. With that you&#8217;ll need to use  <code>&lt;NuxtPage/&gt;</code> component as an page content container. This way content of any new page will be located within this exact destination. Around this you can create your own dedicated layout, or build external dedicated one - about layouts I&#8217;ll write within the next posts.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!8WW1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbee3ea7c-b9a0-4ab7-b11e-5326780f6a64_1460x450.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!8WW1!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbee3ea7c-b9a0-4ab7-b11e-5326780f6a64_1460x450.png 424w, https://substackcdn.com/image/fetch/$s_!8WW1!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbee3ea7c-b9a0-4ab7-b11e-5326780f6a64_1460x450.png 848w, https://substackcdn.com/image/fetch/$s_!8WW1!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbee3ea7c-b9a0-4ab7-b11e-5326780f6a64_1460x450.png 1272w, https://substackcdn.com/image/fetch/$s_!8WW1!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbee3ea7c-b9a0-4ab7-b11e-5326780f6a64_1460x450.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!8WW1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbee3ea7c-b9a0-4ab7-b11e-5326780f6a64_1460x450.png" width="1456" height="449" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bee3ea7c-b9a0-4ab7-b11e-5326780f6a64_1460x450.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:449,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:52381,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!8WW1!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbee3ea7c-b9a0-4ab7-b11e-5326780f6a64_1460x450.png 424w, https://substackcdn.com/image/fetch/$s_!8WW1!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbee3ea7c-b9a0-4ab7-b11e-5326780f6a64_1460x450.png 848w, https://substackcdn.com/image/fetch/$s_!8WW1!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbee3ea7c-b9a0-4ab7-b11e-5326780f6a64_1460x450.png 1272w, https://substackcdn.com/image/fetch/$s_!8WW1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbee3ea7c-b9a0-4ab7-b11e-5326780f6a64_1460x450.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">app/app.vue</figcaption></figure></div><p>Back in the day, the <code>app.vue</code> component was the true entry point for a Nuxt/Vue application. It was where you initialized the app and had the option to extend it with external tools. Now, things work a bit differently - you can handle all of this through Nuxt configuration files instead. If you're using the <code>pages/</code> directory for default, automatic routing, it makes sense <strong>not</strong> to rely on <code>app.vue</code> as your entry point. That said, if you're building a single-page app, a simple landing page, or a lightweight single-page setup, sticking with <code>app.vue</code> can still be a practical choice. If not go with option 2.</p></li><li><p>Removing <code>app.vue and </code>creating/using only the <code>index.vue</code> file inside your /<code>pages</code> directory. This way you&#8217;ll not need the <code>&lt;NuxtPage/&gt;</code> component anymore, and everything what you&#8217;ll put inside the <code>pages/index.vue</code> component will became your app entry point instead. Original contents from <code>app.vue</code> file move to <code>index.vue</code> one.</p><p><br>Default layout will be applied automatically&#8230; bit more about this within the next posts. So if you don&#8217;t want to miss any of the upcoming materials please subscribe.</p></li></ol><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.vue.house/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.vue.house/subscribe?"><span>Subscribe now</span></a></p><h4>Linter &amp; Prettier</h4><p>Nuxt has its own, dedicated module for <strong><a href="https://eslint.org">ESLint</a></strong><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-5" href="#footnote-5" target="_self">5</a><strong> </strong>integration. To not mess and overcomplicate things at the very beginning let&#8217;s use it. Further, we will be able to extend or change this setup. Although, handling it as a &#8220;native&#8221; solution might be beneficial for now.</p><p>Run with this command.</p><pre><code>npx nuxi module add eslint</code></pre><p><strong>Nuxi</strong> will install all the ESLint internals for you. Packages <code>@nuxt/eslint</code> and <code>eslint</code> will be added. ESLint will be installed in new <code>9.x</code> version ecquiped with the <a href="https://eslint.org/blog/2022/08/new-config-system-part-2">&#8220;new&#8221; flat configuration</a>. Now, when you run your application again the <code>eslint.config.mjs</code> file should be created inside your root folder. If not (some issues may occur) you can still install it manually. Use this command.</p><pre><code>pnpm add -D @nuxt/eslint eslint typescript</code></pre><p>Then, add<code> '@nuxt/eslint'</code> to your <a href="https://nuxt.com/docs/guide/directory-structure/modules">modules array</a> in <code>nuxt.config.ts</code> file. No matter if you&#8217;ll use the module or manual way you should install <code>typescript</code> package additionally - ESLint will need it anyway. At the end please add the <code>eslint.config.mjs</code> file to the root of your project. Like this.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!WPD6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03756669-f157-4c2b-aafc-9774a5cb3439_1460x688.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!WPD6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03756669-f157-4c2b-aafc-9774a5cb3439_1460x688.png 424w, https://substackcdn.com/image/fetch/$s_!WPD6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03756669-f157-4c2b-aafc-9774a5cb3439_1460x688.png 848w, https://substackcdn.com/image/fetch/$s_!WPD6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03756669-f157-4c2b-aafc-9774a5cb3439_1460x688.png 1272w, https://substackcdn.com/image/fetch/$s_!WPD6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03756669-f157-4c2b-aafc-9774a5cb3439_1460x688.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!WPD6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03756669-f157-4c2b-aafc-9774a5cb3439_1460x688.png" width="1456" height="686" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/03756669-f157-4c2b-aafc-9774a5cb3439_1460x688.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:686,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:80656,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!WPD6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03756669-f157-4c2b-aafc-9774a5cb3439_1460x688.png 424w, https://substackcdn.com/image/fetch/$s_!WPD6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03756669-f157-4c2b-aafc-9774a5cb3439_1460x688.png 848w, https://substackcdn.com/image/fetch/$s_!WPD6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03756669-f157-4c2b-aafc-9774a5cb3439_1460x688.png 1272w, https://substackcdn.com/image/fetch/$s_!WPD6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03756669-f157-4c2b-aafc-9774a5cb3439_1460x688.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">eslint.config.mjs | <a href="https://gist.githubusercontent.com/lukasborawski/32740458f8a7ddc21a413b8ec0ace01f/raw/905c625291cc9f2cd38994e86f0ef18a51378d15/eslint.config.mjs">Source</a></figcaption></figure></div><p>Time for <strong><a href="https://prettier.io">Prettier</a></strong><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-6" href="#footnote-6" target="_self">6</a>. You can install it with this command.</p><pre><code>pnpm add -D prettier eslint-config-prettier</code></pre><p>Additionally, we will add a set of rules to <strong>complement</strong> ESLint. Prettier, along with the <code>eslint-config-prettier</code> package, will handle formatting and also cover all <strong>Vue-specific rules</strong>, so there&#8217;s no need to add anything extra. To see which rules are defined and how they work, you can check the <strong>source</strong> of the package. </p><p>Alright, now let&#8217;s create a configuration file for Prettier: <code>prettier.config.mjs</code> (let&#8217;s stay consistent with naming and formats). You&#8217;ll need something like this.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!kY8C!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1805112-df6e-4496-ae38-2528b1b1e925_1460x628.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!kY8C!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1805112-df6e-4496-ae38-2528b1b1e925_1460x628.png 424w, https://substackcdn.com/image/fetch/$s_!kY8C!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1805112-df6e-4496-ae38-2528b1b1e925_1460x628.png 848w, https://substackcdn.com/image/fetch/$s_!kY8C!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1805112-df6e-4496-ae38-2528b1b1e925_1460x628.png 1272w, https://substackcdn.com/image/fetch/$s_!kY8C!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1805112-df6e-4496-ae38-2528b1b1e925_1460x628.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!kY8C!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1805112-df6e-4496-ae38-2528b1b1e925_1460x628.png" width="1456" height="626" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e1805112-df6e-4496-ae38-2528b1b1e925_1460x628.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:626,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:70665,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!kY8C!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1805112-df6e-4496-ae38-2528b1b1e925_1460x628.png 424w, https://substackcdn.com/image/fetch/$s_!kY8C!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1805112-df6e-4496-ae38-2528b1b1e925_1460x628.png 848w, https://substackcdn.com/image/fetch/$s_!kY8C!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1805112-df6e-4496-ae38-2528b1b1e925_1460x628.png 1272w, https://substackcdn.com/image/fetch/$s_!kY8C!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1805112-df6e-4496-ae38-2528b1b1e925_1460x628.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">prettier.config.mjs | <a href="https://prettier.io/docs/configuration#basic-configuration">Source</a></figcaption></figure></div><p>Most of Prettier&#8217;s defaults will be fine for most codebases, one thing that I would suggest is to extend your workspace line with from 90 to 120 characters, and to use single quotes along with any data structures. That&#8217;s it.</p><p>Let&#8217;s include prettier ESLint rules within its configuration. In the <code>eslint.config.mjs</code> file add this enhancement.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!e2v_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba3f6c45-51bf-4658-bca0-23126c546d04_1460x806.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!e2v_!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba3f6c45-51bf-4658-bca0-23126c546d04_1460x806.png 424w, https://substackcdn.com/image/fetch/$s_!e2v_!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba3f6c45-51bf-4658-bca0-23126c546d04_1460x806.png 848w, https://substackcdn.com/image/fetch/$s_!e2v_!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba3f6c45-51bf-4658-bca0-23126c546d04_1460x806.png 1272w, https://substackcdn.com/image/fetch/$s_!e2v_!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba3f6c45-51bf-4658-bca0-23126c546d04_1460x806.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!e2v_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba3f6c45-51bf-4658-bca0-23126c546d04_1460x806.png" width="1456" height="804" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ba3f6c45-51bf-4658-bca0-23126c546d04_1460x806.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:804,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:105769,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!e2v_!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba3f6c45-51bf-4658-bca0-23126c546d04_1460x806.png 424w, https://substackcdn.com/image/fetch/$s_!e2v_!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba3f6c45-51bf-4658-bca0-23126c546d04_1460x806.png 848w, https://substackcdn.com/image/fetch/$s_!e2v_!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba3f6c45-51bf-4658-bca0-23126c546d04_1460x806.png 1272w, https://substackcdn.com/image/fetch/$s_!e2v_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba3f6c45-51bf-4658-bca0-23126c546d04_1460x806.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">eslint.config.mjs | <a href="https://gist.githubusercontent.com/lukasborawski/5c0590edfe75e75c67d865e343b12da9/raw/c9dc33f2aacc80f8d293ab36d2ae4c6edfa8ae00/eslint.cong.mjs">Source</a></figcaption></figure></div><p>Finally, let&#8217;s add linting script to our <code>package.json</code> file. Like that.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!dgbk!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feb49144d-525e-4aed-b833-59b1f79e4011_1460x568.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!dgbk!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feb49144d-525e-4aed-b833-59b1f79e4011_1460x568.png 424w, https://substackcdn.com/image/fetch/$s_!dgbk!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feb49144d-525e-4aed-b833-59b1f79e4011_1460x568.png 848w, https://substackcdn.com/image/fetch/$s_!dgbk!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feb49144d-525e-4aed-b833-59b1f79e4011_1460x568.png 1272w, https://substackcdn.com/image/fetch/$s_!dgbk!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feb49144d-525e-4aed-b833-59b1f79e4011_1460x568.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!dgbk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feb49144d-525e-4aed-b833-59b1f79e4011_1460x568.png" width="1456" height="566" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/eb49144d-525e-4aed-b833-59b1f79e4011_1460x568.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:566,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:48787,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!dgbk!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feb49144d-525e-4aed-b833-59b1f79e4011_1460x568.png 424w, https://substackcdn.com/image/fetch/$s_!dgbk!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feb49144d-525e-4aed-b833-59b1f79e4011_1460x568.png 848w, https://substackcdn.com/image/fetch/$s_!dgbk!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feb49144d-525e-4aed-b833-59b1f79e4011_1460x568.png 1272w, https://substackcdn.com/image/fetch/$s_!dgbk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feb49144d-525e-4aed-b833-59b1f79e4011_1460x568.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">package.json</figcaption></figure></div><p>By adding <code>--fix</code> you&#8217;re asking ESLint to fix all of your code bugs; if it&#8217;s possible of course. In most cases these will be a small corrects within your code syntax and style.</p><p>You can test it now. Run this command.</p><pre><code>pnpm run lint</code></pre><p>If everything&#8217;s as should be, you will get this error message.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Oak8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F378eff84-e28e-4e63-a450-182a69a4ac09_1460x272.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Oak8!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F378eff84-e28e-4e63-a450-182a69a4ac09_1460x272.png 424w, https://substackcdn.com/image/fetch/$s_!Oak8!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F378eff84-e28e-4e63-a450-182a69a4ac09_1460x272.png 848w, https://substackcdn.com/image/fetch/$s_!Oak8!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F378eff84-e28e-4e63-a450-182a69a4ac09_1460x272.png 1272w, https://substackcdn.com/image/fetch/$s_!Oak8!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F378eff84-e28e-4e63-a450-182a69a4ac09_1460x272.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Oak8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F378eff84-e28e-4e63-a450-182a69a4ac09_1460x272.png" width="1456" height="271" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/378eff84-e28e-4e63-a450-182a69a4ac09_1460x272.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:271,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:31238,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Oak8!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F378eff84-e28e-4e63-a450-182a69a4ac09_1460x272.png 424w, https://substackcdn.com/image/fetch/$s_!Oak8!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F378eff84-e28e-4e63-a450-182a69a4ac09_1460x272.png 848w, https://substackcdn.com/image/fetch/$s_!Oak8!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F378eff84-e28e-4e63-a450-182a69a4ac09_1460x272.png 1272w, https://substackcdn.com/image/fetch/$s_!Oak8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F378eff84-e28e-4e63-a450-182a69a4ac09_1460x272.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Good! This means that the rules provided by <code>eslint-config-prettier</code> working as expected. However, from version <code>3.2</code> of Vue we don&#8217;t need to have a parent/root Node anymore, so this rule is not necessary here. To disable this warning you can add the <code>vue/no-multiple-template-root</code> rule to your <code>eslint.config.mjs</code> file. Like you can see it below, just after you can run lint command again.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!gCxt!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26d8c0d3-b19d-4ac6-9cea-e9f689838437_1460x688.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!gCxt!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26d8c0d3-b19d-4ac6-9cea-e9f689838437_1460x688.png 424w, https://substackcdn.com/image/fetch/$s_!gCxt!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26d8c0d3-b19d-4ac6-9cea-e9f689838437_1460x688.png 848w, https://substackcdn.com/image/fetch/$s_!gCxt!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26d8c0d3-b19d-4ac6-9cea-e9f689838437_1460x688.png 1272w, https://substackcdn.com/image/fetch/$s_!gCxt!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26d8c0d3-b19d-4ac6-9cea-e9f689838437_1460x688.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!gCxt!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26d8c0d3-b19d-4ac6-9cea-e9f689838437_1460x688.png" width="1456" height="686" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/26d8c0d3-b19d-4ac6-9cea-e9f689838437_1460x688.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:686,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:83724,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!gCxt!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26d8c0d3-b19d-4ac6-9cea-e9f689838437_1460x688.png 424w, https://substackcdn.com/image/fetch/$s_!gCxt!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26d8c0d3-b19d-4ac6-9cea-e9f689838437_1460x688.png 848w, https://substackcdn.com/image/fetch/$s_!gCxt!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26d8c0d3-b19d-4ac6-9cea-e9f689838437_1460x688.png 1272w, https://substackcdn.com/image/fetch/$s_!gCxt!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26d8c0d3-b19d-4ac6-9cea-e9f689838437_1460x688.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">eslint.config.mjs</figcaption></figure></div><p>Now, linter should not report any issues and problems with your code. Let&#8217;s go!</p><h4>Husky</h4><p>As a final step, <strong>to get things even more legit and more sexy</strong> we can add <strong><a href="https://typicode.github.io/husky">Husky</a></strong>. Husky is a git hook handler that is able to initialize certain process while running selected git actions. For instance, to parse our files with Linter and Prettier when we&#8217;ll be creating a new commit. With Husky we will also add <code>lint-staged</code> (<a href="https://github.com/lint-staged/lint-staged">repository</a>) package thanks to which only staged files will be checked. Now, in your root run this command.</p><pre><code>pnpm add -D husky lint-staged</code></pre><p>You should be using Husky in version <code>9</code>, as this configuration refers to it.</p><p>Just after inside your <code>package.json</code> file add this script.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Rf2w!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc033b44b-02aa-4abc-9168-6765f3cb2b52_1460x568.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Rf2w!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc033b44b-02aa-4abc-9168-6765f3cb2b52_1460x568.png 424w, https://substackcdn.com/image/fetch/$s_!Rf2w!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc033b44b-02aa-4abc-9168-6765f3cb2b52_1460x568.png 848w, https://substackcdn.com/image/fetch/$s_!Rf2w!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc033b44b-02aa-4abc-9168-6765f3cb2b52_1460x568.png 1272w, https://substackcdn.com/image/fetch/$s_!Rf2w!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc033b44b-02aa-4abc-9168-6765f3cb2b52_1460x568.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Rf2w!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc033b44b-02aa-4abc-9168-6765f3cb2b52_1460x568.png" width="1456" height="566" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c033b44b-02aa-4abc-9168-6765f3cb2b52_1460x568.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:566,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:54297,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Rf2w!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc033b44b-02aa-4abc-9168-6765f3cb2b52_1460x568.png 424w, https://substackcdn.com/image/fetch/$s_!Rf2w!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc033b44b-02aa-4abc-9168-6765f3cb2b52_1460x568.png 848w, https://substackcdn.com/image/fetch/$s_!Rf2w!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc033b44b-02aa-4abc-9168-6765f3cb2b52_1460x568.png 1272w, https://substackcdn.com/image/fetch/$s_!Rf2w!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc033b44b-02aa-4abc-9168-6765f3cb2b52_1460x568.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">package.json</figcaption></figure></div><p>Let&#8217;s run it to initialize Huksy&#8217;s internals. </p><pre><code>pnpm run husky</code></pre><p>Husky will create a dedicated <code>.husky</code> folder where all the necessary hooks will be added (as files). All of these files will be empty and ready to be filled-in with our desired commands. You can leave them along, or remove (except <code>husky.sh</code>), leaving just <code>pre-commit</code> one (this one will be in use) - up to you. </p><p>One additional note here: we defined <code>husky</code> script, not <code>prepare</code> one (as it&#8217;s common to do) because when <code>pnpm</code> will run the installation script it will always run the <code>prepare</code> script as well, so to avoid creating Husky files all over (overwriting edits) we&#8217;re using a different definition for the Husky init script.</p><p>Next, provide <code>lint-staged</code> proper configuration. Inside <code>package.json</code> file please add this notation.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!rL7r!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc75d36f-4751-4ec9-b0e6-a8d0e858ebe5_1460x510.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!rL7r!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc75d36f-4751-4ec9-b0e6-a8d0e858ebe5_1460x510.png 424w, https://substackcdn.com/image/fetch/$s_!rL7r!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc75d36f-4751-4ec9-b0e6-a8d0e858ebe5_1460x510.png 848w, https://substackcdn.com/image/fetch/$s_!rL7r!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc75d36f-4751-4ec9-b0e6-a8d0e858ebe5_1460x510.png 1272w, https://substackcdn.com/image/fetch/$s_!rL7r!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc75d36f-4751-4ec9-b0e6-a8d0e858ebe5_1460x510.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!rL7r!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc75d36f-4751-4ec9-b0e6-a8d0e858ebe5_1460x510.png" width="1456" height="509" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bc75d36f-4751-4ec9-b0e6-a8d0e858ebe5_1460x510.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:509,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:48217,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!rL7r!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc75d36f-4751-4ec9-b0e6-a8d0e858ebe5_1460x510.png 424w, https://substackcdn.com/image/fetch/$s_!rL7r!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc75d36f-4751-4ec9-b0e6-a8d0e858ebe5_1460x510.png 848w, https://substackcdn.com/image/fetch/$s_!rL7r!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc75d36f-4751-4ec9-b0e6-a8d0e858ebe5_1460x510.png 1272w, https://substackcdn.com/image/fetch/$s_!rL7r!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc75d36f-4751-4ec9-b0e6-a8d0e858ebe5_1460x510.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">package.json</figcaption></figure></div><p>As you can see this is the exact command as we have already defined for our lint script. So now we need to swap them, like that.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Su5I!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff87877b6-7b67-42cb-8bce-1df7bf45d379_1460x806.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Su5I!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff87877b6-7b67-42cb-8bce-1df7bf45d379_1460x806.png 424w, https://substackcdn.com/image/fetch/$s_!Su5I!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff87877b6-7b67-42cb-8bce-1df7bf45d379_1460x806.png 848w, https://substackcdn.com/image/fetch/$s_!Su5I!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff87877b6-7b67-42cb-8bce-1df7bf45d379_1460x806.png 1272w, https://substackcdn.com/image/fetch/$s_!Su5I!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff87877b6-7b67-42cb-8bce-1df7bf45d379_1460x806.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Su5I!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff87877b6-7b67-42cb-8bce-1df7bf45d379_1460x806.png" width="1456" height="804" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f87877b6-7b67-42cb-8bce-1df7bf45d379_1460x806.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:804,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:87863,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Su5I!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff87877b6-7b67-42cb-8bce-1df7bf45d379_1460x806.png 424w, https://substackcdn.com/image/fetch/$s_!Su5I!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff87877b6-7b67-42cb-8bce-1df7bf45d379_1460x806.png 848w, https://substackcdn.com/image/fetch/$s_!Su5I!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff87877b6-7b67-42cb-8bce-1df7bf45d379_1460x806.png 1272w, https://substackcdn.com/image/fetch/$s_!Su5I!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff87877b6-7b67-42cb-8bce-1df7bf45d379_1460x806.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">package.json</figcaption></figure></div><p>Great, now you can run <code>lint-staged</code> command.</p><pre><code>pnpm run lint</code></pre><p>You should see something like this.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Jiwe!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa32ec26c-306e-4cf0-9cd7-b5e5e4e06301_1460x450.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Jiwe!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa32ec26c-306e-4cf0-9cd7-b5e5e4e06301_1460x450.png 424w, https://substackcdn.com/image/fetch/$s_!Jiwe!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa32ec26c-306e-4cf0-9cd7-b5e5e4e06301_1460x450.png 848w, https://substackcdn.com/image/fetch/$s_!Jiwe!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa32ec26c-306e-4cf0-9cd7-b5e5e4e06301_1460x450.png 1272w, https://substackcdn.com/image/fetch/$s_!Jiwe!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa32ec26c-306e-4cf0-9cd7-b5e5e4e06301_1460x450.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Jiwe!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa32ec26c-306e-4cf0-9cd7-b5e5e4e06301_1460x450.png" width="1456" height="449" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a32ec26c-306e-4cf0-9cd7-b5e5e4e06301_1460x450.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:449,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:58860,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Jiwe!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa32ec26c-306e-4cf0-9cd7-b5e5e4e06301_1460x450.png 424w, https://substackcdn.com/image/fetch/$s_!Jiwe!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa32ec26c-306e-4cf0-9cd7-b5e5e4e06301_1460x450.png 848w, https://substackcdn.com/image/fetch/$s_!Jiwe!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa32ec26c-306e-4cf0-9cd7-b5e5e4e06301_1460x450.png 1272w, https://substackcdn.com/image/fetch/$s_!Jiwe!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa32ec26c-306e-4cf0-9cd7-b5e5e4e06301_1460x450.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Awesome, <strong>Lint Staged works as expected</strong>. Finally (I promise), we need to add the same command to our pre-commit git hook file. In the <code>.husky</code> folder, inside the <code>pre-commit</code> file provide this content.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!yNhk!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43ed6aa4-48de-4d7c-9efa-23e1114fe9d3_1460x390.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!yNhk!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43ed6aa4-48de-4d7c-9efa-23e1114fe9d3_1460x390.png 424w, https://substackcdn.com/image/fetch/$s_!yNhk!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43ed6aa4-48de-4d7c-9efa-23e1114fe9d3_1460x390.png 848w, https://substackcdn.com/image/fetch/$s_!yNhk!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43ed6aa4-48de-4d7c-9efa-23e1114fe9d3_1460x390.png 1272w, https://substackcdn.com/image/fetch/$s_!yNhk!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43ed6aa4-48de-4d7c-9efa-23e1114fe9d3_1460x390.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!yNhk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43ed6aa4-48de-4d7c-9efa-23e1114fe9d3_1460x390.png" width="1456" height="389" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/43ed6aa4-48de-4d7c-9efa-23e1114fe9d3_1460x390.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:389,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:35169,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!yNhk!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43ed6aa4-48de-4d7c-9efa-23e1114fe9d3_1460x390.png 424w, https://substackcdn.com/image/fetch/$s_!yNhk!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43ed6aa4-48de-4d7c-9efa-23e1114fe9d3_1460x390.png 848w, https://substackcdn.com/image/fetch/$s_!yNhk!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43ed6aa4-48de-4d7c-9efa-23e1114fe9d3_1460x390.png 1272w, https://substackcdn.com/image/fetch/$s_!yNhk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43ed6aa4-48de-4d7c-9efa-23e1114fe9d3_1460x390.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">.husky/pre-commit</figcaption></figure></div><p>You may want to comment the <code>. "$(dirname "$0")/h"</code> line as it may wrongly read your internal paths and exit the script without running the hooks. Please check the internals as it can be polyfied with your setup.</p><p>Now you can add file to git and commit them to the repository. Voil&#224;!</p><h3>Understand The Most Important Internals</h3><p>To properly close this first chapter, and wrap version 4 first steps guide I&#8217;ll spin around some of the built-in Nuxt features to emphasize how they can help you with further development. </p><p>But first, if you&#8217;re not subscribed yet go and <strong>HIT that button</strong>!</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.vue.house/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.vue.house/subscribe?"><span>Subscribe now</span></a></p><h4>Auto Imports &#129693;</h4><p>Nuxt has this amazing feature of <strong>auto-imports</strong> that will help you <strong>write less code</strong> by automatically making certain composables, components, and utilities available <strong>without needing to import them manually</strong> - everything what you&#8217;ll put inside the <code>components/</code>, <code>composables/</code> and <code>utils/</code> folders. This keeps your code clean and reduces boilerplate.</p><p>So instead of:</p><pre><code>import { useRoute } from 'vue-router';

const route = useRoute();</code></pre><p>You just write:</p><pre><code>const route = useRoute();</code></pre><h4>Managing Assets &#128444;&#65039;</h4><p>In Nuxt, the <code>assets/</code> directory is used for <strong>static resources</strong> like styles, images, fonts, and other files that should be processed by Webpack or Vite. Unlike the <code>public/</code> folder, files in <code>assets/</code> are <strong>not directly accessible</strong> via a URL - they need to be referenced inside your Vue components or stylesheets. Nuxt also automatically processes styles placed inside <code>assets/</code>.</p><p>&#9989; Use<strong> </strong><code>assets/</code><strong> </strong>for <strong>SCSS, images, and fonts</strong> that need processing.<br>&#9989; Use<strong> </strong><code>public/</code><strong> for static files </strong>that should remain unchanged.<br>&#9989; Reference assets with<strong> </strong><code>@/assets/</code><strong> or </strong><code>~/assets/</code><strong> </strong>in Vue and SCSS<strong>.</strong><br>&#9989; <strong>Define global styles in </strong><code>assets/styles/</code><strong> </strong>and load them via<strong> </strong><code>nuxt.config.ts</code>.</p><h4>State Management &#129525;</h4><p>In Nuxt, <strong>state management</strong> helps you <strong>store, update, and share data</strong> across components efficiently. While you can use <strong>Vuex</strong> (in Nuxt 2) or <strong>Pinia</strong>, Nuxt 3 (and now with Nuxt 4) introduces a <strong>simpler and built-in state management solution</strong> using <code>useState()</code>.</p><h4>Layers &#129521;</h4><p>Nuxt Layers are a powerful way to <strong>extend, reuse, and modularize</strong> Nuxt applications. They let you build applications with <strong>multiple codebases</strong>, making it easier to share configurations, UI components, and logic across different projects. Think of layers as Nuxt-powered<strong> micro-frameworks</strong> that can be stacked together like building blocks.</p><div><hr></div><p><strong>What&#8217;s next</strong>? Check out how to suit your newly created Nuxt 4 project within the monorepo. <strong>Turborepo</strong> to be more precise. Your app will be grateful, promise!</p><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;c2c9b9b6-6d33-4f8a-aa5c-ac1e041cbfe4&quot;,&quot;caption&quot;:&quot;Hey! Before you walk away, wondering why you&#8217;d ever need a monorepo for your small and not-so-complicated Nuxt application, stick with me for a moment. I promise to keep it light and only share pract&#8230;&quot;,&quot;cta&quot;:null,&quot;showBylines&quot;:true,&quot;size&quot;:&quot;sm&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;Nuxt with Turborepo &#128168;&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:75204049,&quot;name&quot;:&quot;Lukas Borawski&quot;,&quot;bio&quot;:&quot;Hi, I'm Lukas, an experienced software engineer writing with passion about programming (of course), music, and running. Based in sunny Portugal, I'm also a road cyclist, alternative coffee lover and amateur photographer.&quot;,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/355f95dc-d93f-47db-bb24-99c9efb22ec3_2044x2044.jpeg&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;post_date&quot;:&quot;2025-02-10T12:37:32.197Z&quot;,&quot;cover_image&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b489187b-dd28-485f-add9-b39da74c3133_840x600.png&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://www.vue.house/p/nuxt-with-turborepo&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:156457911,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:0,&quot;comment_count&quot;:0,&quot;publication_id&quot;:null,&quot;publication_name&quot;:&quot;vue.house&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1bf903f-0963-44e7-addd-ddfe2251233d_800x800.png&quot;,&quot;belowTheFold&quot;:true,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div><div><hr></div><p>OK guys. That&#8217;s it for now. <strong>Please subscribe</strong> to this publication, this way you&#8217;ll not miss any further updates, and I&#8217;m planning to write a lot, very extensively. <strong>Thanks in advance</strong> for your trust and support, Lukas.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.vue.house/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.vue.house/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><p>Please <strong>let me know how you find this article</strong>. What I can improve?</p><div class="poll-embed" data-attrs="{&quot;id&quot;:268163}" data-component-name="PollToDOM"></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-1" href="#footnote-anchor-1" class="footnote-number" contenteditable="false" target="_self">1</a><div class="footnote-content"><p>When I talk about a framework&#8217;s <strong>primitives</strong>, I&#8217;m referring to its most fundamental building blocks - the low-level constructs or mechanisms on top of which everything else is built. While each JavaScript framework might label or structure these differently, there are common themes you&#8217;ll see repeated: reactivity, rendering, components, and lifecycle hooks.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-2" href="#footnote-anchor-2" class="footnote-number" contenteditable="false" target="_self">2</a><div class="footnote-content"><p>In frontend programming, <strong>abstraction</strong> refers to creating simpler, more convenient layers or interfaces on top of complex underlying functionality. This practice allows developers to work with more human-friendly constructs rather than constantly dealing with low-level details. The best example of abstraction, that all of you probably will recognize can be <a href="https://jquery.com/">jQuery,</a> abstraction over the browser&#8217;s native DOM and event APIs.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-3" href="#footnote-anchor-3" class="footnote-number" contenteditable="false" target="_self">3</a><div class="footnote-content"><p><strong>Macro functions</strong> are essentially a helpers that transforms or generates code before - or at build time - so you don&#8217;t have to write repetitive boilerplate by hand. Instead of executing every time the app runs (like a normal function), a macro function is &#8220;expanded&#8221; during the build or compile process into more detailed code that does what you need.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-4" href="#footnote-anchor-4" class="footnote-number" contenteditable="false" target="_self">4</a><div class="footnote-content"><p><strong>CLI</strong> stands for <strong>Command-Line Interface</strong>. It's a way to interact with a computer program using text commands in a terminal or command prompt, rather than through a graphical user interface (GUI). In most cases CLI is built from a set of <a href="https://en.wikipedia.org/wiki/Bash_(Unix_shell)">bash scripts</a> that are able to execute some sequence of processes in order to manage application code.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-5" href="#footnote-anchor-5" class="footnote-number" contenteditable="false" target="_self">5</a><div class="footnote-content"><p><strong>Linter</strong> is a tool that helps you <strong>catch mistakes and enforce coding standards</strong> in your code. Think of it like <strong>spell check</strong> for programming - it scans your code and warns you about potential issues before they become real problems.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-6" href="#footnote-anchor-6" class="footnote-number" contenteditable="false" target="_self">6</a><div class="footnote-content"><p><strong>Prettier</strong> is an <strong>automatic code formatter</strong> that ensures your code looks clean and consistent. Unlike a <strong>linter</strong> (which finds mistakes and enforces rules), Prettier <strong>rewrites your code</strong> to follow a consistent style - so you don&#8217;t have to worry about spaces, colons, indentation, or line breaks.</p></div></div>]]></content:encoded></item></channel></rss>