Skip to content

Commit 1b9a198

Browse files
authored
Ensure that on CI we do production build (#49)
1 parent faa528a commit 1b9a198

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/entrypoint/scripts/build.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ const { argv } = require("./argv");
77

88
const PRODUCTION_URL = "https://code.deth.net";
99
const DEVELOPMENT_URL = "https://localhost:5001";
10+
const isProd = argv.production || process.env.CI === "true";
11+
12+
console.log("Is production build? ", isProd);
1013

1114
rmSync("./dist", { recursive: true, force: true });
1215
copySync("./public", "./dist");
@@ -15,7 +18,7 @@ copySync("./public", "./dist");
1518
let indexHtml = readFileSync("./dist/index.html", "utf8");
1619
indexHtml = indexHtml.replace(
1720
"{{APPLICATION_URL}}",
18-
argv.production ? PRODUCTION_URL : DEVELOPMENT_URL
21+
isProd ? PRODUCTION_URL : DEVELOPMENT_URL
1922
);
2023
writeFileSync("./dist/index.html", indexHtml, { encoding: "utf8" });
2124

0 commit comments

Comments
 (0)