Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Commit

Permalink
Merge pull request #245 from johnmuhl/patch-1
Browse files Browse the repository at this point in the history
Include process.env in exporter server options
  • Loading branch information
Rich-Harris committed May 4, 2018
2 parents 93128a0 + 56ac1ae commit 562a91f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/cli/export.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ export async function exporter(export_dir: string, { basepath = '' }) {

const proc = child_process.fork(path.resolve(`${build_dir}/server.js`), [], {
cwd: process.cwd(),
env: {
env: Object.assign({
PORT: port,
NODE_ENV: 'production',
SAPPER_DEST: build_dir,
SAPPER_EXPORT: 'true'
}
}, process.env)
});

const seen = new Set();
Expand Down Expand Up @@ -103,4 +103,4 @@ export async function exporter(export_dir: string, { basepath = '' }) {
return ports.wait(port)
.then(() => handle(new URL(`/${basepath}`, origin))) // TODO all static routes
.then(() => proc.kill());
}
}

0 comments on commit 562a91f

Please sign in to comment.