Replies: 5 comments 16 replies
-
new filter syntaxfiltering in rollup plugins works with javascript, as such vite-plugin-svelte used rollup/pluginutils to create a filter function from user-provided include/exclude patterns. It combined include with a list of extensions with The way the new hook filters work include values are combined with PR: sveltejs/vite-plugin-svelte#1132 Another notable thing is that vite-plugin-svelte (similar to plugin-vue) uses query params as hints, eg Constructing regexes for include filters to match file extensions is a bit cumbersome, i ended up using a regex like
|
Beta Was this translation helpful? Give feedback.
-
transformWithESBuild -> transformWithOxctransformWithESBuild allowed passing in transformWithOxc reads from tsconfig and expects these values to be present in user config. This is the case in |
Beta Was this translation helpful? Give feedback.
-
rollup vs rolldowntreeshaking/dead code removal in rolldown is not on the same level as rollups, leading to compatibility issues with some svelte features for serverside bundles rolldown/rolldown#3403 |
Beta Was this translation helpful? Give feedback.
-
optimizer pluginsin vtes esbuild optimizer, vite-plugin-svelte injects a custom esbuild plugin to transform .svelte files in node_modules during optimize. Vite's scanner can scan esbuild implementation here: https://github.com/sveltejs/vite-plugin-svelte/blob/f02083d77859d9c602fb462b87f1c06a9a770867/packages/vite-plugin-svelte/src/utils/esbuild.js#L20 (note: due to vite-plugin-svelte reading svelte config, the plugin isn't statically configured but rather a placeholder is added in config hook that is later updated with Object.assign) unfortunately i havn't found a way to identify the scanner phase yet or a way to disable a svelte optimizer plugin during it. Neither code exclude filters work nor does the plugin context contain environment information in the hooks that are called (buildStart/transform). {
"rollupVersion": "4.23.0",
"rolldownVersion": "1.0.0-beta.11-commit.0a985f3",
"watchMode": false
} |
Beta Was this translation helpful? Give feedback.
-
typing thingswith Adding |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I've started working on adding support for rolldown-vite in vite-plugin-svelte. In this thread i'll post some notes/findings that might help improving rolldown-vite/rolldown and other plugin authors to improve their plugins.
main PR here: sveltejs/vite-plugin-svelte#1135
Beta Was this translation helpful? Give feedback.
All reactions