Skip to content

Commit b28f3d6

Browse files
committed
docs(vite-plugin-svelte): update readme
1 parent 1235440 commit b28f3d6

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

packages/vite-plugin-svelte/README.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ module.exports = defineConfig(({ command, mode }) => {
1212
return {
1313
plugins: [
1414
svelte({
15-
hot: !isProduction,
16-
emitCss: true
15+
/* inline options here */
1716
})
1817
],
1918
build: {
@@ -25,9 +24,19 @@ module.exports = defineConfig(({ command, mode }) => {
2524

2625
## Options
2726

28-
```ts
29-
// TODO
30-
```
27+
vite-plugin-svelte reads the vite configuration and uses an appropriate default configuration
28+
29+
It also loads `svelte.config.js` (or `svelte.config.cjs`) from the configured `vite.root` directory automatically.
30+
31+
Options are applied in the following order:
32+
33+
1. vite-plugin-svelte defaults
34+
2. svelte.config.js in vite.root
35+
3. inline options passed in vite.config.js
36+
37+
It supports all options from rollup-plugin-svelte and some additional options to tailor the plugin to your needs.
38+
39+
For more Information check [options.ts](packages/vite-plugin-svelte/src/utils/options.ts)
3140

3241
## License
3342

0 commit comments

Comments
 (0)