Skip to content

Add babel-plugin-dev expression#2107

Closed
thomasguillory wants to merge 2 commits into
mui:masterfrom
Dashlane:feature/add-babel-plugin-dev-expression
Closed

Add babel-plugin-dev expression#2107
thomasguillory wants to merge 2 commits into
mui:masterfrom
Dashlane:feature/add-babel-plugin-dev-expression

Conversation

@thomasguillory
Copy link
Copy Markdown

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 ?

Thomas Guillory added 2 commits November 9, 2015 21:39
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
Copy Markdown
Member

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

@thomasguillory
Copy link
Copy Markdown
Author

@oliviertassinari 😄

@oliviertassinari
Copy link
Copy Markdown
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
Copy link
Copy Markdown
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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants