Ensure webpack.js resolves before modules.js#929
Ensure webpack.js resolves before modules.js#929joeheyming wants to merge 1 commit intoternjs:masterfrom
Conversation
I had a webpack configuration where modules.js was resolving node_modules/foo when I wanted my webpack.config.js to be resolved instead. In order to enforce the correct order, I changed the resolve addition to unshift instead of push to the array. This ensures webpack resolves before modules.
|
Hi, modules.js uses registered resolvers first. Maybe you use node_resolve plugin too. |
|
Oh, I just realize the config of plugins are object. |
|
@othree, I originally wanted to allow the plugin config have the order. I can't find the code block I made, but somehow, I decided to switch to this current implementation because the original implementation made no sense to me. I'm not very happy working on this project. I basically decided to fork the project and go my own way. I'm still willing to collaborate, but I have been feeling ignored for too long. @ See #927 |
|
Sorry to let you feel bad. I think to change the order is a breaking change. |
|
I've been using this change for over a year now and it works great |
I had a webpack configuration where modules.js was
resolving node_modules/foo when I wanted my webpack.config.js to
be resolved instead.
In order to enforce the correct order, I changed the
resolve addition to unshift instead of push to the array.
This ensures webpack resolves before modules.