I'm trying to pass a parameter to my react project. I set it up with create-react-app.
I set up package.json like so:
"main": "index.js",
"scripts": {
"start": "webpack-dev-server --open --mode development",
"build": "webpack --mode production"
},
index.js:
console.log(process.argv)
I start it up and pass in my parameter:
yarn start --serverPort=3531
But then process.argv is just an empty array. How can I pass parameters to the react app?