From aa5cf1580ab96205b08548f32b24b31817552ab7 Mon Sep 17 00:00:00 2001 From: Conduitry Date: Thu, 24 Jun 2021 15:42:54 -0400 Subject: [PATCH] Fix adapter-node regression (#1756) --- .changeset/chilled-kiwis-drop.md | 5 +++++ packages/adapter-node/index.js | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/chilled-kiwis-drop.md diff --git a/.changeset/chilled-kiwis-drop.md b/.changeset/chilled-kiwis-drop.md new file mode 100644 index 000000000000..6253bfbefd79 --- /dev/null +++ b/.changeset/chilled-kiwis-drop.md @@ -0,0 +1,5 @@ +--- +'@sveltejs/adapter-node': patch +--- + +Fix regression caused by writing `env.js` to the wrong path diff --git a/packages/adapter-node/index.js b/packages/adapter-node/index.js index 7fd2de3773e5..57a4a4c5b429 100644 --- a/packages/adapter-node/index.js +++ b/packages/adapter-node/index.js @@ -43,7 +43,7 @@ export default function ({ const files = fileURLToPath(new URL('./files', import.meta.url)); utils.copy(files, '.svelte-kit/node'); writeFileSync( - join(files, 'env.js'), + '.svelte-kit/node/env.js', `export const host = process.env[${JSON.stringify( host_env )}] || '0.0.0.0';\nexport const port = process.env[${JSON.stringify(port_env)}] || 3000;`