I'm trying to access command line parameters from an npm script in my "constants.js" file.
While I have been able to access parameters in the webpack.config.js file using process.env, it seems to be undefined in my app source files.
The scenario consists of running a script from the console like so:
npm webpack-dev-server --hot MY_PARAMETER=some_value
Afterwards, I want to somehow access MY_PARAMETER in my constants.js file by checking:
process.env.MY_PARAMETER === "some_value" // true
If anyone could provide some assistance on this matter, I would greatly appreciate it. Thank you!