Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat] explicitly set compilerOptions.hydratable to config.kit.hydrate #2024

Merged
merged 2 commits into from
Jul 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/nervous-items-kiss.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': patch
---

explicitly set compilerOptions.hydratable to config.kit.ssr
10 changes: 8 additions & 2 deletions packages/kit/src/core/build/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,10 @@ async function build_client({
plugins: [
svelte({
extensions: config.extensions,
emitCss: !config.kit.amp
emitCss: !config.kit.amp,
compilerOptions: {
hydratable: !!config.kit.hydrate
}
})
]
});
Expand Down Expand Up @@ -462,7 +465,10 @@ async function build_server(
},
plugins: [
svelte({
extensions: config.extensions
extensions: config.extensions,
compilerOptions: {
hydratable: !!config.kit.hydrate
}
})
],
// this API is marked as @alpha https://github.com/vitejs/vite/blob/27785f7fcc5b45987b5f0bf308137ddbdd9f79ea/packages/vite/src/node/config.ts#L129
Expand Down
5 changes: 4 additions & 1 deletion packages/kit/src/core/dev/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,10 @@ class Watcher extends EventEmitter {
plugins: [
svelte({
extensions: this.config.extensions,
emitCss: !this.config.kit.amp
emitCss: !this.config.kit.amp,
compilerOptions: {
hydratable: !!this.config.kit.hydrate
}
})
],
publicDir: this.config.kit.files.assets,
Expand Down