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

fix: don't add ?import for @vite-ignoreed import #14851

Conversation

sapphi-red
Copy link
Member

Description

I tested this with the repro in #14850.

fix #14850

Additional context


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines and follow the PR Title Convention.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

@sapphi-red sapphi-red added the p3-minor-bug An edge case that only affects very specific usage (priority) label Nov 2, 2023
Copy link

stackblitz bot commented Nov 2, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@patak-dev patak-dev merged commit 42fee9e into vitejs:main Nov 2, 2023
10 checks passed
@sapphi-red sapphi-red deleted the fix/dont-add-import-query-for-vite-ignored-import branch November 3, 2023 04:52
@sapphi-red
Copy link
Member Author

@bluwy @patak-dev This seems to broke vitepress (mentioned in #14860).
It can be fixed by vuejs/vitepress#3173
But I'm not sure if users has the responsibility of adding ?import.

This PR will resolve some edge case issues:

But on the other hand, this PR could cause some breakage that relied on this behavior and will make the use of @vite-ignore more difficult (as users will need to understand ?import needs to be appended in some cases).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p3-minor-bug An edge case that only affects very specific usage (priority)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Importing public files with /* @vite-ignore */ dynamic imports throws an error
3 participants