Bake PUBLIC_SSR into the build instead of reading it at runtime
This commit is contained in:
parent
3b79271874
commit
7f0d823d6c
4 changed files with 20 additions and 7 deletions
|
|
@ -3,8 +3,8 @@ import adapterNode from "@sveltejs/adapter-node";
|
|||
import adapterStatic from "@sveltejs/adapter-static";
|
||||
|
||||
// PUBLIC_SSR picks the deployment target: a Node server that renders pages
|
||||
// (yes) or a static single-page bundle (no, the default). The same flag turns
|
||||
// SSR on in +layout.ts.
|
||||
// (yes) or a static single-page bundle (no, the default). vite.config.ts bakes
|
||||
// the same flag into the app as SSR_ENABLED.
|
||||
const env = loadEnv(
|
||||
process.env.NODE_ENV ?? "production",
|
||||
process.cwd(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue