You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: Entry resolves before async resolve call the callback function #3641
The resolve event should be asynchronous and need to wait for all plugins callbacks before continuing the resolution, but doesn't (at least for the entry).
Actual Behaviour
Right now, webpack does not wait for all resolve handlers before continuing the resolution.
The following Webpack configuration (custom plugin) will finish the bundle, THEN wait 10 seconds for the resolve to finish.
with your resolve plugin you add an alternative how to resolve modules. Because you add it after the original resolvers the original resolving algorithm has higher priority. From logical point of view your plugin is only used if the original algorithm is not successful. For performance reasons hooks are not executed in sequence but parallel (see applyPluginsParallelBailResult in tapable) with a bailing callback handler. This means if the first plugin (the original resolving algorithm) returns a result the result of the second plugin is ignored and it doesn't need to wait for it.
You can try to resolve a request that can't be resolved by the original algorithm (like ./eeeentry.js) and it should wait for your plugin to finish.
So you're saying the best way for me to wait for my entry point's dependency (because TypeScript will error if I compile too early) to be ready is to either rename the entry point to something that doesn't exist, or hook up before-resolve?
I understand how and why you do it, but isn't there a way to shut the original resolver for certain filetypes?
Activity
chore(webpack): upgrade webpack to RC 3.
chore(webpack): upgrade webpack to RC 3. (#3786)
sokra commentedon Dec 30, 2016
It's correct this way.
with your
resolveplugin you add an alternative how to resolve modules. Because you add it after the original resolvers the original resolving algorithm has higher priority. From logical point of view your plugin is only used if the original algorithm is not successful. For performance reasons hooks are not executed in sequence but parallel (seeapplyPluginsParallelBailResultin tapable) with a bailing callback handler. This means if the first plugin (the original resolving algorithm) returns a result the result of the second plugin is ignored and it doesn't need to wait for it.You can try to resolve a request that can't be resolved by the original algorithm (like
./eeeentry.js) and it should wait for your plugin to finish.hansl commentedon Jan 7, 2017
So you're saying the best way for me to wait for my entry point's dependency (because TypeScript will error if I compile too early) to be ready is to either rename the entry point to something that doesn't exist, or hook up
before-resolve?I understand how and why you do it, but isn't there a way to shut the original resolver for certain filetypes?
chore(webpack): upgrade webpack to RC 3. (angular#3786)
timse commentedon Mar 28, 2017
As there seams to be nothing happening anymore here, I will close this for now.
Feel free to reopen, if you think this needs to be resolved.
chore(webpack): upgrade webpack to RC 3. (angular#3786)