Skip to content

Install

Installing vite-plugin-local is easy. Simply pull it in via your package manager of choice.

bash
npm install --save-dev vite-plugin-local

# or
# npm i -d vite-plugin-local
bash
bun install --dev vite-plugin-local

# or
# bun add --dev vite-plugin-local
# bun i -d vite-plugin-local
bash
yarn add --dev vite-plugin-local

# or
# yarn i -d vite-plugin-local

Usage

This minimal usage example shows how to use vite-plugin-local in your Vite configuration, using the plugin’s default settings.

javascript
// vite.config.{js,ts}
import vue from '@vitejs/plugin-vue'
import { defineConfig } from 'vite'
import local from 'vite-plugin-local'

export default defineConfig({
  plugins: [
    vue(), // svelte(), react(), ...
    local()
  ]
})

To read about the more elaborate usage API, check out the the following page in our documentation.

Released under the MIT License.