Handle returned Promises
See original GitHub issueWebpack 2 supports returning a Promise from the config function.
https://webpack.js.org/configuration/configuration-types/#exporting-a-promise
This currently isn’t supported by webpack-merge.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Using promises - JavaScript - MDN Web Docs
Essentially, a promise is a returned object to which you attach callbacks, instead of passing callbacks into a function. Imagine a function, ...
Read more >How to handle returning a promise when one is already ...
The only method I can think of is to return a Promise which wraps a call to setInterval checking the status. Surely there...
Read more >Error handling with promises - The Modern JavaScript Tutorial
Promise chains are great at error handling. When a promise rejects, the control jumps to the closest rejection handler.
Read more >Javascript: How to access the return value of a Promise object
In the moment when console.log() function starting to run, a Promise that should be returned from a fetch() request is in a pending...
Read more >JavaScript Promise Tutorial – How to Resolve or Reject ...
The new Promise() constructor returns a promise object. As the executor function needs to handle async operations, the returned promise ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I have found a solution that does not require
webpack-mergeto support promises:This does not work:
This does work:
I am not sure if this solves every problem out there. But it solved mine.
I will throw an error in this case at v5 (#135). It’s likely best to wrap
mergewithin aPromiseat the user space as that avoids complexity though I can still accept a PR at a later time.