$ show nuxt/nuxt.new
This repository serves as the landing page for the Nuxt web framework, providing a minimal but polished interface to kickstart Nuxt projects. The core functionality is a gallery of starter templatesβeach pointing to a GitHub repository branchβwith one-click redirections to CodeSandbox, StackBlitz, or a local `npm create nuxt@latest` command. The application is built with Nuxt 4 and leverages server routes for API lookups (slug-based) and redirects, client-side data fetching via `useFetch`, and a performant static generation pipeline. It also includes a custom `style-inlining` module that purges unused CSS and inlines critical styles during prerendering, and a `purge-comments` Vite plugin that strips HTML comments from Vue templates at build time. The UI is styled with Tailwind CSS and Nuxt UI components, and the entire site is designed to be lightweight (budgeted at 270 KB total). It is a genuinely useful tool for the Nuxt community, acting as both a promotional site and a practical starter launcher.
The LLM identified 3 files worth highlighting for reuse:
A self-contained button component that copies a given text string to the clipboard using VueUse's `useClipboard` composable. It accepts props for background styling, size, and text content, and provides visual feedback on copy (icon changes to checkmark). This component is fully isolated, has clear prop-driven behavior, and can be extracted into any Vue or Nuxt project with minimal changes.
A Nuxt module that injects a custom Vite plugin to strip HTML comments (`<!-- ... -->`) from Vue template files during the transform phase. This is a simple yet effective performance micro-optimization that reduces output size and can be reused in any Vue/Vite project by adapting the `addVitePlugin` call. It demonstrates a clean pattern for hooking into the build pipeline.
A Nuxt module that integrates PurgeCSS with the prerendering pipeline to eliminate unused CSS and inline the remaining critical styles directly into the HTML. It captures the compiled entry CSS bundle via a Vite plugin, then hooks into Nitro's `prerender:generate` to purge CSS per route and inline it, removing external stylesheet links. This pattern is highly reusable for any Nuxt project aiming for optimal CSS delivery and demonstrates advanced knowledge of Nuxt's build hooks and static generation internals.