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
env presets in .babelrc seem to be ignored starting 6.3.1 #381
Comments
I am also having all kind of weirdness since 6.3.1. It seems this PR #379 is introducing a serious regression. |
Noticed this as well, where plugins defined in "env" would not have their settings applied, which broke our test setup. Webpack version: Babel core version: Babel loader version: Please tell us about your environment: Current behavior:
Options for NODE_ENV=coverage and NODE_ENV=test are not applied, leading to errors when root-import and rewire plugins are not applied. Expected/desired behavior: Workaround: |
I released 6.3.2 with the fix, I'm still not entirely sure why this happened. |
I'm in 7.0.0 of babel-loader but 6.23.0 of babel-runtime but I still experience issues like this
Somehow when I run locally, "inline-dotenv" is not called. |
How does your webpack config look like? |
I'm using nextjs so they have their own default version, and this is my custom webpack config.
|
Upon more inspection, it seems like it might be caused by babel-loader caching. Removing the cache directory fixed it. |
I'm submitting a bug report
Webpack Version:
1.14.0
Babel Core Version:
6.23.1
Babel Loader Version:
6.3.1
Please tell us about your environment:
macOS Sierra 10.12.2
Current behavior:
Even when I include the "react" as a presets, with .babelrc like
it doesn't seem to be used, got errors like
Module build failed: SyntaxError: Unexpected token (33:2)
complaining about the JSX syntax.I noticed this is a new behavior in version 6.3.1. With everything else being the same, if one simply npm install babel-loader 6.3.0, the error will be gone.
Also note that the non-environment specific settings are fine, for example, .babelrc like this works:
Expected/desired behavior:
The presets specified in the "env" section in .babelrc are used.
The text was updated successfully, but these errors were encountered: