Skip to content
This repository was archived by the owner on Feb 16, 2021. It is now read-only.

Commit d3cc40b

Browse files
committed
chore: Set NODE_ENV to production for umd and iife bundle formats.
1 parent 2342b5f commit d3cc40b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

bili.config.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const config: Config = {
55
tcomb: "index.js"
66
},
77
output: {
8-
format: ["cjs", "umd", "esm"],
8+
format: ["cjs", "esm", "umd", "iife"],
99
moduleName: "tcomb",
1010
sourceMap: true,
1111
sourceMapExcludeSources: true
@@ -15,15 +15,15 @@ const config: Config = {
1515
babelrc: false
1616
},
1717
extendConfig(config, { format }) {
18-
config.env = {
19-
NODE_ENV: "production"
20-
};
21-
if (format === "umd") {
22-
config.output.minify = true;
23-
}
2418
if (format === "esm") {
2519
config.output.fileName = "[name].module.js";
2620
}
21+
if (format === "umd" || format === "iife") {
22+
config.env = {
23+
NODE_ENV: "production"
24+
};
25+
config.output.minify = true;
26+
}
2727
return config;
2828
}
2929
};

0 commit comments

Comments
 (0)