Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
  • Loading branch information
errorx666 committed Jul 15, 2018
1 parent 5ae4029 commit 690e365
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,10 @@ function log() {
*/

function save(namespaces) {
var env = process.env; // alias env to avoid problems with webpack DefinePlugin
// webpack DefinePlugin will replace "process.env.DEBUG" with a constant expression, e.g. "true." To
// avoid this issue, we need to alias "process.env" to a variable, so that webpack DefinePlugin will
// not create a syntax error by producing the invalid statement "false = namespaces;"
var env = process.env;
if (null == namespaces) {
// If you set a process.env field to null or undefined, it gets cast to the
// string 'null' or 'undefined'. Just delete instead.
Expand Down

0 comments on commit 690e365

Please sign in to comment.