Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning in production build that I use development build. #143

Closed
bukowskiadam opened this issue Mar 2, 2018 · 0 comments
Closed

Warning in production build that I use development build. #143

bukowskiadam opened this issue Mar 2, 2018 · 0 comments

Comments

@bukowskiadam
Copy link

Hi there,

I get this warning from redux introduced in reduxjs/redux#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 bukowskiadam closed this as not planned Won't fix, can't repro, duplicate, stale Sep 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant