Skip to content

Commit 544ff98

Browse files
tyler-daneCopilot
andauthored
Update packages/web/webpack.config.mjs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 2131d70 commit 544ff98

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/web/webpack.config.mjs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ const loadEnvFile = (envName) => {
2121

2222
const envFile = map[envName];
2323

24+
// Handle unmapped environment names explicitly
25+
if (typeof envFile === "undefined") {
26+
console.error(
27+
`Error: Unrecognized environment name '${envName}'. Valid options are: ${Object.keys(map).join(", ")}.`
28+
);
29+
return;
30+
}
2431
// Skip file loading for test environment or if file is explicitly null
2532
if (envName === "test" || envFile === null) {
2633
console.log(

0 commit comments

Comments
 (0)