Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v6.0.0 #208

Merged
merged 12 commits into from
Sep 14, 2021
Prev Previous commit
Next Next commit
Fix ENV variable interpolations
  • Loading branch information
smithki committed Sep 10, 2021
commit 3f58e7f39a217990945fc38c8b8ba14b51ae32c0
7 changes: 6 additions & 1 deletion scripts/utils/microbundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ export async function microbundle(
external?: string;
} = {},
) {
console.log(
Object.entries(environment)
.map(([key, value]) => `${key}=${value}`)
.join(','),
);
if (options.output) {
/* eslint-disable prettier/prettier */
const args = [
Expand All @@ -26,7 +31,7 @@ export async function microbundle(
'--sourcemap', options.sourcemap ? 'true' : 'false',
options.external && '--external', options.external,
'--output', options.output,
'--define', Object.entries(environment).map(([key, value]) => `${key}=${value}`).join(','),
'--define', Object.entries(environment).map(([key, value]) => `process.env.${key}=${value}`).join(','),
options.name && '--name', options.name,
].filter(Boolean);
/* eslint-enable prettier/prettier */
Expand Down