U
U
uzi_no_uzi2020-02-09 15:42:54
JavaScript
uzi_no_uzi, 2020-02-09 15:42:54

Why is process.env.NODE_END not being set?

I have the following code in my webpack.config.js (and another one too, but that's the point):

//Mode configuration

const isDev = process.env.NODE_END === "development";
console.log(process.env.NODE_END);


In package.json the following script to run:
"scripts": {
    "dev": "set NODE_ENV=development && webpack-dev-server --color --open --mode development",
    "build": "cross-env NODE_ENV=production webpack --mode production"
  },


But in the console I get underfined. Although I set NODE_ENV in development.

Tried to do it through cross-env. Same problem.

What could be the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alex, 2020-02-09
@uzi_no_uzi

process.env.NODE_END
NODE_ENV
See the difference?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question