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

Add babel-plugin-dev expression #2107

Conversation

thomasguillory
Copy link
Contributor

This plugin allows us to write shorter expressions to check if we are in a dev environment and to ouput warnings.

This has been proposed here: #2039 (comment)

Note: the karma config file adds a sourceMap option to babel. I'm not sure how to test that these source maps are still generated with the new config. Can someone check that ?

Currently babel config is defined inline and in several places. This
commit moves all the babel config to .babelrc
This plugin allows us to write shorter expressions to check if we are in
a dev environment and to ouput warnings.
@oliviertassinari
Copy link
Member

Haha, I have started doing it at #2105.
What the advantage of using __DEV__ over process.env.NODE_ENV !== 'production'?

@thomasguillory
Copy link
Contributor Author

@oliviertassinari 😄

@oliviertassinari
Copy link
Member

@thomasguillory We merged the other PR. Thanks anyway for this one 👍.
Yours is not strictly identical, if you think that it's valuable, fell free to rebase.

@oliviertassinari oliviertassinari added PR: needs revision The pull request can't be merged. More details is available on the code review or fails in the CI and removed Review: review-needed labels Nov 9, 2015
@oliviertassinari
Copy link
Member

@thomasguillory Feel free to submit a new one if you think we can improve the way it's done now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: needs revision The pull request can't be merged. More details is available on the code review or fails in the CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants