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

Clarifying: Resolving import at-rules not resolving webpack's resolve.modules? #1064

Open
2 of 4 tasks
chardskarth opened this issue Jun 10, 2022 · 3 comments
Open
2 of 4 tasks

Comments

@chardskarth
Copy link

Documentation Is:
It's mentioned here that resolution is done:

  1. First, by resolving as a relative path
  2. If not found, it will try to search through the node_modules directory.
  • Missing
  • Needed
  • Confusing
  • Not Sure?

Please Explain in Detail...

I think it should be mentioned that webpack's alias is tried to be resolved before the "node_module" resolution part.

Which brings me to my next question:
Is it expected that webpack's resolve.modules is not used as an alternative for resolution?

Your Proposal for Changes

Indicate, under Webpack provides an [advanced mechanism to resolve files](https://webpack.js.org/concepts/module-resolution/). that specifying a resolution via webpack's resolve alias can be used.

@alexander-akait
Copy link
Member

alexander-akait commented Jun 10, 2022

@chardskarth Yes, alias is prefered, it was simplifed to show ~ changes, resolving logic is more complex, even more you can change node_modules and inject own plugins to resolver

@chardskarth
Copy link
Author

@alexander-akait is it a future improvement to support webpack's resolve.modules option?

@alexander-akait
Copy link
Member

I mean you are right, but if we want describe all resolver's steps it will be very big and complex, anyway if you want to improve docs - feel free to send a PR

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

No branches or pull requests

3 participants
@alexander-akait @chardskarth and others