Releases: sveltejs/vite-plugin-svelte
@sveltejs/[email protected]
Patch Changes
- Only optimize nested cjs dependencies (#163)
@sveltejs/[email protected]
@sveltejs/[email protected]
@sveltejs/[email protected]
Patch Changes
- add automatically excluded svelte dependencies to ssr.noExternal (#147)
@sveltejs/[email protected]
@sveltejs/[email protected]
@sveltejs/[email protected]
Major Changes
-
automatically include svelte in vite config optimizeDeps.include (#137)
Previously, svelte was automatically excluded. We include it now by default to improve deduplication.
As a result, svelte is pre-bundled by vite during dev, which it logs when starting the devserver
Pre-bundling dependencies: svelte/animate svelte/easing svelte/internal svelte/motion svelte/store (...and 2 more) (this will be run only when your dependencies or config have changed)
And it's also visible in the browsers network tab, where requests for svelte imports now start with
node_modules/.vite/
during dev.Check out the vite pre-bundling documentation for more information.
To get the old behavior back, add the following to your vite config
{ ['svelte']; }
Patch Changes
@sveltejs/[email protected]
Major Changes
-
change default value of compilerOptions.hydratable to false (#122)
This is done to align with svelte compiler defaults and improve output in non-ssr scenarios.
Add
{compilerOptions: {hydratable: true}}
to vite-plugin-svelte config if you need hydration (eg. for ssr)
Minor Changes
- add config option
experimental.dynamicCompileOptions
for finegrained control over compileOptions (#122)
Patch Changes
@sveltejs/[email protected]
@sveltejs/[email protected]
Minor Changes
-
Add
experimental
section to options and moveuseVitePreprocess
there (#99)Experimental options are not ready for production use and breaking changes to them can occur in any release
If you already had
useVitePreprocess
enabled, 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.generateMissingPreprocessorSourcemaps
to use it