redux-mock-store icon indicating copy to clipboard operation
redux-mock-store copied to clipboard

Warning in production build that I use development build.

Open bukowskiadam opened this issue 7 years ago • 0 comments

Hi there,

I get this warning from redux introduced in https://github.com/reactjs/redux/pull/1075 on my app with production build.

I've included redux-mock-store by accident in production build. It seems that during your build process for es module you replace NODE_ENV to development which gets replaced in included redux.

Steps to reproduce

  1. build redux-mock-store with npm run build:es
  2. peek into file dist/index-es.js, line 205:
if ("development" !== 'production' && typeof isCrushed.name === 'string' && isCrushed.name !== 'isCrushed') {

When I include redux-mock-store, then in production build it always gives this warning.

Solution

Probably you should not replace NODE_ENV for es module like redux does this. Ref: https://github.com/reactjs/redux/blob/55e77e88c98723f1883929458bb0144430108143/package.json#L25 https://github.com/reactjs/redux/blob/55e77e88c98723f1883929458bb0144430108143/rollup.config.js#L12

bukowskiadam avatar Mar 02 '18 09:03 bukowskiadam