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(css): sourcemap crash with postcss (fix #7978) #7982

Merged

Conversation

sapphi-red
Copy link
Member

Description

This crash occured because removing <no source> was illegal.

I wrote this line based on a hypothesis that source maps will be combined incorrectly if multiple <no source> exists.
https://github.com/vitejs/vite/pull/7173/files#diff-2cfbd4f4d8c32727cd8e1a561cffbde0b384a3ce0789340440e144f9d64c10f6R834-R835
But since that happens rarely and a crash should be avoided, I think it I should remove this line.

fixes #7978

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

@sapphi-red sapphi-red added feat: css p3-minor-bug An edge case that only affects very specific usage (priority) labels May 1, 2022
@patak-dev patak-dev merged commit 7f9f8f1 into vitejs:main May 1, 2022
@sapphi-red sapphi-red deleted the fix/css-sourcemap-post-css-no-source branch May 2, 2022 05:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat: css 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.

Vite css sourcemaps crashed
2 participants