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: ignore ids that start with \0 in plugin asset, fix #3424 #3436

Merged
merged 1 commit into from May 17, 2021
Merged

fix: ignore ids that start with \0 in plugin asset, fix #3424 #3436

merged 1 commit into from May 17, 2021

Conversation

patak-dev
Copy link
Member

Description

It is a convention in rollup that some plugins will mark an id with a '\0' prefix. These ids should be then handled by the same plugin. In the case of #3424, an id of the form '\0/root/node_modules/quill/assets/icons/align-left.svg' was processed by Vite's asset plugin resulting in an error when trying to load the file. This same file was also present without the initial '\0' and loaded correctly. I don't fully understand why the extra prefixed id is being generated (probably by the commonjs plugin) but these ids should be handled by the plugin that generated them and AFAIU ignored by our internal plugins.


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 Commit 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.

Copy link
Member

@Shinigami92 Shinigami92 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want a test for that?
Should we add a link to this PR?

@patak-dev
Copy link
Member Author

Do we want a test for that?
Should we add a link to this PR?

The PR doesn't add more info than the comment. I'll think if there is a good test to be added that doesn't imply importing the quill library. Ideas welcomed if someone wants to tackle this.

@patak-dev patak-dev merged commit f6cfe30 into vitejs:main May 17, 2021
@patak-dev patak-dev deleted the fix/plugin-asset-0 branch May 17, 2021 07:22
fi3ework pushed a commit to fi3ework/vite that referenced this pull request May 22, 2021
iendeavor added a commit to runtime-env/import-meta-env that referenced this pull request Jan 30, 2022
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

3 participants