0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-23 21:53:55 -05:00
astro/.changeset/chatty-planes-bathe.md
Bjorn Lu a342a486c2
Refactor Svelte preprocess integration handling (#5901)
* Let user setup vitePreprocess

* Abstract function

* Add changeset

* Update svelte syntax

* Make fallback

* Fix docs

* Update changeset

* Fix types
2023-01-19 08:13:40 -05:00

532 B

@astrojs/svelte astro
major minor

The fallback Svelte preprocessor will only be applied if a custom preprocess option is not passed to the svelte() integration option, or in the svelte.config.js file.

To support IDE autocompletion, or if you're migrating from @astrojs/svelte v1, you can create a svelte.config.js file with:

import { vitePreprocess } from '@astrojs/svelte';

export default {
	preprocess: vitePreprocess(),
};

This file will also be generated by astro add svelte by default.