Skip to content

Commit

Permalink
fix: issue with bundled compiler not respecting NODE_ENV
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanPiercey committed Jan 28, 2021
1 parent 0affcd8 commit c7be2a7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/compiler/src/babel-plugin/index.js
Expand Up @@ -273,9 +273,10 @@ function unique(item, i, list) {
}

function shouldOptimize() {
const { NODE_ENV, MARKO_DEBUG } = process.env;
return (
(MARKO_DEBUG && MARKO_DEBUG !== "false" && MARKO_DEBUG !== "0") ||
(NODE_ENV && NODE_ENV !== "development")
(process.env.MARKO_DEBUG &&
process.env.MARKO_DEBUG !== "false" &&
process.env.MARKO_DEBUG !== "0") ||
(process.env.NODE_ENV && process.env.NODE_ENV !== "development")
);
}

0 comments on commit c7be2a7

Please sign in to comment.