Skip to content

Commit

Permalink
[fix] add kit to ssr.noExternal in dev mode (#2332)
Browse files Browse the repository at this point in the history
  • Loading branch information
ignatiusmb authored Aug 31, 2021
1 parent bb80006 commit b11679d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/witty-maps-pull.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': patch
---

Add `@sveltejs/kit` to `noExternal` in dev server as well
8 changes: 6 additions & 2 deletions packages/kit/src/core/dev/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,12 @@ class Watcher extends EventEmitter {
}
},
ssr: {
// @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
]
},
base: this.config.kit.paths.assets.startsWith('/') ? `${this.config.kit.paths.assets}/` : '/'
});
Expand Down

0 comments on commit b11679d

Please sign in to comment.