Skip to content
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

Ensure webpack.js resolves before modules.js #929

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

joeheyming
Copy link

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.

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.
@othree
Copy link
Collaborator

othree commented Jul 4, 2018

Hi, modules.js uses registered resolvers first.
If nothing found by any registered resolvers.
It will then use the default resolver to try again (ref).

Maybe you use node_resolve plugin too.
And it resolves node_modules/foo.
Can you confirm the order of plugins in the .tern-project is as expected?

@othree
Copy link
Collaborator

othree commented Jul 5, 2018

Oh, I just realize the config of plugins are object.
I think a better solution is try to allow the plugin config have order.

@joeheyming
Copy link
Author

joeheyming commented Jul 9, 2018

@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

@othree
Copy link
Collaborator

othree commented Sep 21, 2018

Sorry to let you feel bad.
I am in a rush time recently(home, work, family).

I think to change the order is a breaking change.
Might cause other user have issue working on tern + webpack.
So I need take some time to see how people use webpack (I didnt use it for my job and project.)
And I think the worst case is to add a new configure option if this order make any sense.

@joeheyming
Copy link
Author

I've been using this change for over a year now and it works great

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants