-
-
Save CreativeTechGuy/ae6ec05ee9ec5cb71807f2ff74a99c41 to your computer and use it in GitHub Desktop.
webpack-cli v5 node-env issue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "webpack-cli-node-env-test", | |
"scripts": { | |
"build:development": "webpack --define-process-env-node-env development", | |
"build:production": "webpack --define-process-env-node-env production" | |
}, | |
"devDependencies": { | |
"webpack": "5.75.0", | |
"webpack-cli": "5.0.0" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function () { | |
console.log("process.env.NODE_ENV =", process.env.NODE_ENV); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Referenced here: webpack/webpack-cli#3503