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

Resolve imports with query params #6

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

dons20
Copy link

@dons20 dons20 commented Nov 29, 2021

I've been using vite for some time and I needed to have my web worker properly resolved with eslint. Workers in vite require me to add a ?worker to the end of the import path which breaks this resolver. I made this little change locally and it works great for this use case, so maybe this is something you'd like to include?

Let me know what you think.

@laysent
Copy link
Owner

laysent commented Nov 30, 2021

I am wondering if you could make this behavior optional? i.e. user can use config to enable/disable it.
I think ? might be used in other scenarios as well (perhaps in combination with some webpack loader), not very sure if this behavior is what users always want.

@dons20
Copy link
Author

dons20 commented Dec 5, 2023

Totally forgot I had this done. I've pushed a change to make this feature optional as it rightly should be 😅 . If this looks good then all it will need is updated documentation and tests

Updated usage of deprecated `substr` to `substring`
Updated some tests to use `path.normalize` for windows support
@dons20 dons20 marked this pull request as ready for review December 5, 2023 07:09
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.

None yet

2 participants