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

Commit

Permalink
chore: Set NODE_ENV to production for umd and iife bundle formats.
Browse files Browse the repository at this point in the history
  • Loading branch information
hastebrot committed May 12, 2019
1 parent 2342b5f commit d3cc40b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions bili.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const config: Config = {
tcomb: "index.js"
},
output: {
format: ["cjs", "umd", "esm"],
format: ["cjs", "esm", "umd", "iife"],
moduleName: "tcomb",
sourceMap: true,
sourceMapExcludeSources: true
Expand All @@ -15,15 +15,15 @@ const config: Config = {
babelrc: false
},
extendConfig(config, { format }) {
config.env = {
NODE_ENV: "production"
};
if (format === "umd") {
config.output.minify = true;
}
if (format === "esm") {
config.output.fileName = "[name].module.js";
}
if (format === "umd" || format === "iife") {
config.env = {
NODE_ENV: "production"
};
config.output.minify = true;
}
return config;
}
};
Expand Down

0 comments on commit d3cc40b

Please sign in to comment.