Releases: sveltejs/vite-plugin-svelte
@sveltejs/[email protected]
Minor Changes
-
Add
experimentalsection to options and moveuseVitePreprocessthere (#99)Experimental options are not ready for production use and breaking changes to them can occur in any release
If you already had
useVitePreprocessenabled, update you config:- svelte({useVitePreprocess: true}) + svelte({experimental: {useVitePreprocess: true}})
-
Add option to ignore svelte preprocessors of other vite plugins (#98)
- ignore them all:
ignorePluginPreprocessors: true - ignore by name:
ignorePluginPreprocessors: ['<name of plugin>',...]
- ignore them all:
-
Move plugin preprocessor definition to api namespace (#98)
Plugins that provide
myplugin.sveltePreprocess, should move it tomyplugin.api.sveltePreprocess, as suggested by rollup -
Experimental: Generate sourcemaps for preprocessors that lack them (#101)
enable option
experimental.generateMissingPreprocessorSourcemapsto use it
Patch Changes
@sveltejs/[email protected]
Minor Changes
-
Resolve svelte to svelte/ssr when building for ssr (fixes #74) (#75) (
f6f56fe) -
Restart dev server when svelte config file changes (#72) (
5100376) -
Allow svelte imports to be added to optimizeDeps.include and don't exclude svelte from optimizeDeps then (#68) (
9583900) -
Vite config can be updated based on values in svelte config (see #60) (#64) (
c3f65fd)
Patch Changes
@sveltejs/[email protected]
Major Changes
-
#54
0f7e256feat: convert to es module with cjs fallback, use named export instead of defaultIf you are using vite-plugin-svelte with require, you should switch to esm and import the named export "svelte".
An example can be found in the usage section of the readmeFor existing esm configs update your import to use the new named export.
- import svelte from '@sveltejs/vite-plugin-svelte'; + import { svelte } from '@sveltejs/vite-plugin-svelte';
continuing with cjs/require is discouraged but if you must use it, update your require statement to use the named export
- const svelte = require('@sveltejs/vite-plugin-svelte'); + const { svelte } = require('@sveltejs/vite-plugin-svelte');
Minor Changes
- #45
673cf61Feature: log svelte compiler warnings to console. use options.onwarn to customize logging