0.1.3 • Published 11 months ago
nuxt-on-demand v0.1.3
Nuxt On Demand
A highly-experimental module to enable bundling chunks on-demand in Nuxt 3
Features
- ⚡️ Minimal extra chunk download
Installation
Install and add nuxt-on-demand
to your nuxt.config
.
# Whichever matches your package manager
pnpm add -D nuxt-on-demand
npm install -D nuxt-on-demand
yarn add -D nuxt-on-demand
export default defineNuxtConfig({
modules: ['nuxt-on-demand'],
})
Usage
No configuration is required. In production, you should see multiple imports being concatenated into single imports.
💻 Development
- Clone this repository
- Enable Corepack using
corepack enable
(usenpm i -g corepack
for Node.js < 16.10) - Install dependencies using
pnpm install
- Stub module with
pnpm dev:prepare
- Run
pnpm dev
to start playground in development mode
License
Made with ❤️
Published under the MIT License.