Skip to content

Build your Nuxt app into a single HTML file by inlining all your CSS and JavaScript.

License

Notifications You must be signed in to change notification settings

IonianPlayboy/nuxt-singlefile

Repository files navigation

Nuxt Single File

npm version npm downloads License Nuxt

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

  1. Add nuxt-singlefile dependency to your project
# Using pnpm
pnpm add -D nuxt-singlefile

# Using yarn
yarn add --dev nuxt-singlefile

# Using npm
npm install --save-dev nuxt-singlefile
  1. 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

# Install dependencies
pnpm install

# Generate type stubs
pnpm run dev:prepare

# Develop with the playground
pnpm run dev

# Build the playground
pnpm run dev:build

# Run ESLint
pnpm run lint

# Run Vitest
pnpm run test
pnpm run test:watch

# Release new version
pnpm run release

About

Build your Nuxt app into a single HTML file by inlining all your CSS and JavaScript.

Topics

Resources

License

Stars

Watchers

Forks