Skip to content

Commit

Permalink
Fix adapter-node regression (#1756)
Browse files Browse the repository at this point in the history
  • Loading branch information
Conduitry authored Jun 24, 2021
1 parent cb9afdc commit aa5cf15
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/chilled-kiwis-drop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/adapter-node': patch
---

Fix regression caused by writing `env.js` to the wrong path
2 changes: 1 addition & 1 deletion packages/adapter-node/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;`
Expand Down

0 comments on commit aa5cf15

Please sign in to comment.