:fire: Quick setup for performance orientated, offline-first React.js applications featuring Redux, hot-reloading, PostCSS, react-router, ServiceWorker, AppCache, FontFaceObserver and Mocha.
I would like to set NODE_ENV to stage so that my code can select a different api endpoint. I would like to test this with a production build. I thought I could do this in the package.json file:
"build:stg": "cross-env NODE_ENV=stage webpack --config internals/webpack/webpack.prod.babel.js --color -p --progress --hide-modules --display-optimization-bailout"
webpack would do a production build with the NODE_ENV set to stage. In my webpack.base.babel.js I have this
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: JSON.stringify(process.env.NODE_ENV),
so when my webpack production configurations uses the base, I thought it would set process.env.NODE_ENV to stage. However, when I console.log(process.env.NODE_ENV) it in my app, I get production. Is this being set anywhere else in the webpack config files? I can't seem to find it.
Hey guys, how are you? I’m having an issue with selectors, i think there is something i don’t understand. I have the following state
{
home: {
cart: {
id1: 3,
id2: 4
}
}
}
And i want to make a selector for amount of products by id. But i’m not sure how can i adapt this https://github.com/reduxjs/reselect#accessing-react-props-in-selectors to my solution. Can anybode help me with this? Thanks!