Skip to content

Commit a8d394a

Browse files
committed
Update README with new compilerOptions
1 parent e41767a commit a8d394a

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

README.md

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,6 @@ export default {
3434
// using `include` and `exclude`
3535
include: 'src/components/**/*.svelte',
3636

37-
// By default, the client-side compiler is used. You
38-
// can also use the server-side rendering compiler
39-
generate: 'ssr',
40-
41-
// ensure that extra attributes are added to head
42-
// elements for hydration (used with generate: 'ssr')
43-
hydratable: true,
44-
4537
// Optionally, preprocess components with svelte.preprocess:
4638
// https://svelte.dev/docs#svelte_preprocess
4739
preprocess: {
@@ -53,10 +45,6 @@ export default {
5345
// Emit CSS as "files" for other plugins to process. default is true
5446
emitCss: false,
5547

56-
// You can optionally set 'customElement' to 'true' to compile
57-
// your components to custom elements (aka web elements)
58-
customElement: false,
59-
6048
// Warnings are normally passed straight to Rollup. You can
6149
// optionally handle them here, for example to squelch
6250
// warnings with a particular code
@@ -66,6 +54,22 @@ export default {
6654

6755
// let Rollup handle all other warnings normally
6856
handler(warning);
57+
},
58+
59+
// You can pass any of the Svelte compiler oiptions
60+
compilerOptions: {
61+
62+
// By default, the client-side compiler is used. You
63+
// can also use the server-side rendering compiler
64+
generate: 'ssr',
65+
66+
// ensure that extra attributes are added to head
67+
// elements for hydration (used with generate: 'ssr')
68+
hydratable: true,
69+
70+
// You can optionally set 'customElement' to 'true' to compile
71+
// your components to custom elements (aka web elements)
72+
customElement: false
6973
}
7074
}),
7175
// see NOTICE below

0 commit comments

Comments
 (0)