Skip to content

Commit 147cc06

Browse files
Merge pull request #1456 from opencomponents/processenv
add envs to process.env
2 parents a1e3b7e + 071b4c5 commit 147cc06

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/registry/routes/helpers/get-component.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,14 @@ export default function getComponent(conf: Config, repository: Repository) {
688688
URL: globalThis?.URL,
689689
URLSearchParams: globalThis?.URLSearchParams,
690690
crypto: globalThis?.crypto,
691-
fetch: globalThis?.fetch
691+
fetch: globalThis?.fetch,
692+
process: {
693+
env: {
694+
NODE_ENV: conf.local ? 'development' : 'production',
695+
...conf.env,
696+
...env
697+
}
698+
}
692699
};
693700

694701
const handleError = (err: {

0 commit comments

Comments
 (0)