Skip to content

Commit

Permalink
[fix] explicitly add kit to ssr.noExternal (#2306)
Browse files Browse the repository at this point in the history
  • Loading branch information
ignatiusmb authored Aug 28, 2021
1 parent 8c53262 commit e21892b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/short-emus-juggle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': patch
---

Add `@sveltejs/kit` to noExternal to resolve hooks module in dev server
10 changes: 6 additions & 4 deletions packages/kit/src/core/build/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -488,10 +488,12 @@ async function build_server(
}
},
ssr: {
// note to self: this _might_ need to be ['svelte', '@sveltejs/kit', ...get_no_external()]
// but I'm honestly not sure. roll with this for now and see if it's ok
// @ts-expect-error - ssr is considered in alpha, so not yet exposed by Vite
noExternal: [...((vite_config.ssr && vite_config.ssr.noExternal) || []), ...svelte_packages]
noExternal: [
'@sveltejs/kit', // TODO: see https://github.com/vitejs/vite/issues/3953
// @ts-expect-error - ssr is considered in alpha, so not yet exposed by Vite
...((vite_config.ssr && vite_config.ssr.noExternal) || []),
...svelte_packages
]
}
});

Expand Down

0 comments on commit e21892b

Please sign in to comment.