What is the order of execution for Svelte preprocessors in svelte.config.js
vs via Vite plugin?
#11987
-
Hello there lovely people. As seen in vite-plugin-svelte docs, as of v3.1.1:
And based on this line in vite-plugin-svelte source code... // ...
appendPreprocessors.push(...pluginsWithPreprocessors.map((p) => p.api.sveltePreprocess));
// ... ... my assumption is that preprocessors provided via Vite plugins all run AFTER those declared in Thanks a lot team. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
the order of preprocessors changed between svelte3 and svelte4. In svelte3, all markup preprocessors ran first, then script, then style. Starting with svelte4, the order in the preproces array defines it, so yes. these vite-plugin defined preprocessors are executed after user-defined ones in svelte.config.js. |
Beta Was this translation helpful? Give feedback.
the order of preprocessors changed between svelte3 and svelte4.
In svelte3, all markup preprocessors ran first, then script, then style. Starting with svelte4, the order in the preproces array defines it, so yes. these vite-plugin defined preprocessors are executed after user-defined ones in svelte.config.js.
https://svelte.dev/docs/svelte-compiler#preprocess