-
-
Notifications
You must be signed in to change notification settings - Fork 448
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 env query parameter. #368
Conversation
Codecov Report@@ Coverage Diff @@
## master #368 +/- ##
==========================================
+ Coverage 80.92% 81.04% +0.12%
==========================================
Files 6 6
Lines 152 153 +1
Branches 33 33
==========================================
+ Hits 123 124 +1
Misses 13 13
Partials 16 16
Continue to review full report at Codecov.
|
fix #283 Signed-off-by: Maël Lavault <[email protected]>
Can someone have a look ? |
@moimael Sorry for the late reply. It looks good to me. cc: @babel/webpack |
Thanks you |
@moimael Could you explain how to use it?
Here's the loader:
|
How did you install it ? Using file:// ? Did you rebuild it before ? |
Manually added the missing piece, but obviously I missed It's good now, thx :) |
This feature isn't working for me. Looking at the code, it looks like this change only affects the
I'm happy to send this in a PR, but I wanted to make sure I'm not missing something first. |
@chrisvasz It is working well for me, so I'm a bit surprised. How do you use it ? I might very well have missed something since it's my first contribution to anything babel related. EDIT: Ok I see what you mean, I'm quite ashamed to have missed that, I'm indeed only changing the cache identifier. I still don't quite understand why it works for me. I think a PR would be great ! |
Same for me. it works well. I don't think it makes sense to update BABEL_ENV. The custom value is passed to babel when compiling, which is why it works. |
@tleunen I'm not seeing where the custom value gets passed into Babel. |
Oh, you're right, I missed the stringify function when reading the code. |
More like |
Allow to override BABEL_ENV/NODE_ENV at loader-level. Useful for isomorphic applications which have separate babel config for client and server.
fix #283
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
What is the current behavior? (You can also link to an open issue here)
See #283
What is the new behavior?
If
forceEnv
is set as loader option, use that instead of BABEL_ENV/NODE_ENVDoes this PR introduce a breaking change?