Fix user config options not being applied when they are imported from an es6 module with babel6 #2376
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This bug exists in webpack1 and webpack2. This patch is against master, let me know if you want me to backport. As people upgrade to babel 6 more and more are going to hit it...
Bug could manifest in two ways:
invalid argument pathToArray
error. This happens because the default foroutput.path
is""
in webpack1webpack()
returning super early but no errors thrown and no bundles created. This happens because the default foroutput.path
iscwd()
. Note: it works from the command line because the check was already there in the CLI parsing code, just not the node API.This bug caused my working webpack config with babel5 to fail when upgrading to babel6. This was mainly due to my custom
output.path
being overwritten, so maybe other errors manifest differently than above. Also note the webpack1 error I got is hard to google...it usually is a symptom of people not putting in absolute paths tooutput.path
...but in this case it is specified and webpack overwrites it as mentioned above.This took me way too long to debug, mainly because there is a lot of indirection and the webpack
Options
have the concept of a "default" that isn't the same as an ES6 default of course! 🔎