zertosh / invariant

invariant
MIT License
1.22k stars 70 forks source link

The invariant message will be stripped in production? #36

Open simon998yang opened 6 years ago

simon998yang commented 6 years ago

Sorry to ask a naive question, but I really scratching my hair right now.

Can you enlighten me how The invariant message will be stripped in production?

I read this https://reactjs.org/blog/2016/07/11/introducing-reacts-error-code-system.html , and understand prior to react 15.2.0, react stripe the message at build time, and after react15.2.0, it rewrite invariant to some error code stead of total stripe the message but also at build time.

So how about this library? do i need to setup some extra build steps as well?

loads of thanks in advance.

simon998yang commented 6 years ago

all right, i figured out this lib needs to be used together with babel-plugin-dev-expression kind.

Better to mention this somewhere in the readme to avoid confusion.