Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

Commit

Permalink
fix: use env from parent process (#1583)
Browse files Browse the repository at this point in the history
Co-authored-by: patzick <13100280+patzick@users.noreply.github.com>
  • Loading branch information
mkucmus and patzick authored Jul 6, 2021
1 parent 9e5f573 commit ae2548f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ async function runBuild({
additionalEntrypoints = [],
}) {
const buildTarget = format === "esm" ? "es2020" : "es2015";
const platform = format === "cjs" ? "node" : "neutral";

try {
const dependencies = Object.keys(packageJson.dependencies || {});
Expand All @@ -103,6 +104,7 @@ async function runBuild({
external,
target: buildTarget,
format,
platform,
});
if (additionalEntrypoints.length) {
const promisses = additionalEntrypoints.map((entrypoint) => {
Expand All @@ -121,6 +123,7 @@ async function runBuild({
external,
target: buildTarget,
format,
platform,
});
});
await Promise.all(promisses);
Expand Down Expand Up @@ -162,7 +165,10 @@ async function build(target) {

// run custom package build if there is one
if (pkg.scripts && pkg.scripts.build) {
await execa("yarn", ["build"], { stdio: "inherit", cwd: pkgDir });
await execa("yarn", ["build"], {
stdio: "inherit",
cwd: pkgDir,
});
return;
}

Expand Down

0 comments on commit ae2548f

Please sign in to comment.