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

bare module - node module import conflict resolving #112

Open
caldwell-63 opened this issue May 12, 2023 · 0 comments
Open

bare module - node module import conflict resolving #112

caldwell-63 opened this issue May 12, 2023 · 0 comments

Comments

@caldwell-63
Copy link

caldwell-63 commented May 12, 2023

what happens if I do

// src/index.js
import something from 'shared';

assuming that my baseUrl is set to src, it can be either:

  • bare import resolving to ./src/shared.js or ./src/shared/index.js
  • a node shared package/module from node_modules

which one takes precedence? Is there a way to explicitly specify package import or bare import? (without falling back to relative paths)

the possibility of such conflicts and no obvious way to resolve them is i think the main reason bare imports are not supported by default by vite or other bundlers, so if this plugin attempts to address this, i think it's worth documenting the approach taken

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

No branches or pull requests

1 participant