Don't inline NODE_ENV by default.

This commit is contained in:
Jason Miller 2019-02-13 14:23:11 -05:00 committed by GitHub
parent 58705aa582
commit 3f6ba4c366
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -315,11 +315,7 @@ function createConfig(options, entry, format, writeMeta) {
globals = Object.assign(globals, parseMappingArgument(options.globals));
}
const NODE_ENV = process.env.NODE_ENV || 'production';
let defines = {
NODE_ENV,
'process.env.NODE_ENV': NODE_ENV
};
let defines = {};
if (options.define) {
defines = Object.assign(defines, parseMappingArgument(options.define));
}