Nuxt Single File
Build your Nuxt app into a single HTML file by inlining all your CSS and JavaScript.
Motivation
This module has been heavily inspired by vite-plugin-singlefile, and aims to provide the same functionality for Nuxt. It is currently in a very early stage, and is not recommended for production use.
Quick Setup
- Add
nuxt-singlefile
dependency to your project
pnpm add -D nuxt-singlefile
yarn add --dev nuxt-singlefile
npm install --save-dev nuxt-singlefile
- Add
nuxt-singlefile
to the modules
section of nuxt.config.ts
export default defineNuxtConfig({
modules: ["nuxt-singlefile"],
});
That's it! You can now use Nuxt Single File in your Nuxt app ✨
Development
pnpm install
pnpm run dev:prepare
pnpm run dev
pnpm run dev:build
pnpm run lint
pnpm run test
pnpm run test:watch
pnpm run release