- Something seems to be wrong with how npm@7 tries to pack the packages,
so this is a republish to see if it had fixed itself.
(still have no clue on what's causing this)
- Changed how the plugin is exported, now you have to do:
import { svelte } from 'vite-plugin-svelte'; export default { plugins: [ svelte(), ], };
- Changed how the plugin options are done to fit the new normalized options, while
the plugin still won't read the
svelte.config.js
for you, atleast you can manually require it yourselfexport default { plugins: [ svelte({ compilerOptions: { dev: true, }, }), ], };
- Added a way to change where the HMR API runtime gets mounted, the default is
/@@svelte-hmr
, but you can change that by doing the following:export default { plugins: [ svelte({ pluginOptions: { hotApiMount: '/@@svelte-hmr', }, }), ], };
- Add
svelte
in optimizeDeps
- Added an incredibly dirty hack to make Vite resolve
svelte
field first before any other fields likemodule
andmain
- 2.3.1: Add option to disable
svelte
field resolution
- Remove TypeScript transformation
We need access to ESBuild AST in order to prevent any necessary imports from being omitted, let's just say it's impossible to do at the moment.
Added TypeScript transformation
Disabled by default, uses Vite's ESBuild instance.2.1.1: Add missing TypeScript option in config (2.1.1)
svelte-hmr
is no longer a peer dependency
Hard to declare whether this should be a breaking change or not
- Use
Plugin#transforms
to transform components during dev.
- Add filenames during development
- 1.2.1: Fix typo in
componentize
function
- Add Svelte to list of optimized deps automatically
- Add HMR support