This package has been deprecated

Author message:

this package has moved to @sveltejs/vite-plugin-svelte, please update your dependencies.

@svitejs/vite-plugin-svelte
TypeScript icon, indicating that this package has built-in type declarations

0.11.1 • Public • Published

@svitejs/vite-plugin-svelte

usage

// vite.config.js
const svelte = require('@svitejs/vite-plugin-svelte')
const { defineConfig } = require('vite')

module.exports = defineConfig(({ command, mode }) => {
  const isProduction = mode === 'production'
  return {
    plugins: [
      svelte({
        /* inline options here */
      })
    ],
    build: {
      minify: isProduction
    }
  }
})

Options

vite-plugin-svelte reads the vite configuration and uses an appropriate default configuration

It also loads svelte.config.js (or svelte.config.cjs) from the configured vite.root directory automatically.

Options are applied in the following order:

  1. vite-plugin-svelte defaults
  2. svelte.config.js in vite.root
  3. inline options passed in vite.config.js

It supports all options from rollup-plugin-svelte and some additional options to tailor the plugin to your needs.

For more Information check options.ts

License

MIT

Package Sidebar

Install

npm i @svitejs/vite-plugin-svelte

Weekly Downloads

9

Version

0.11.1

License

MIT

Unpacked Size

39.2 kB

Total Files

6

Last publish

Collaborators

  • bluwy
  • dominik_g