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: filter out empty srcset (#2863) #2888

Merged
merged 4 commits into from
Apr 16, 2021
Merged

Conversation

fi3ework
Copy link
Member

@fi3ework fi3ework commented Apr 6, 2021

Fixes #2863.

Description

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.

@Shinigami92 Shinigami92 added bug p3-minor-bug An edge case that only affects very specific usage (priority) labels Apr 7, 2021
Shinigami92
Shinigami92 previously approved these changes Apr 7, 2021
@underfin
Copy link
Member

underfin commented Apr 10, 2021

The <source media="(max-width: 799px)" srcset="elva-480w-close-portrait.jpg"> is also valid syntax, but your code is not consider this case.

@fi3ework
Copy link
Member Author

@underfin Done. And if the asset is folder type then return the raw URL.

Shinigami92
Shinigami92 previously approved these changes Apr 10, 2021
Copy link
Member

@patak-dev patak-dev left a comment

Choose a reason for hiding this comment

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

Split isDirectory branch to a new PR, thanks!

@Shinigami92
Copy link
Member

Circle CI just ran out of mem... ignore it 🤷

@fi3ework
Copy link
Member Author

Seems like Circle CI internal error? Anyway to re-run it w/o push?

@patak-dev patak-dev merged commit 0d4f803 into vitejs:main Apr 16, 2021
@patak-dev
Copy link
Member

Thanks for the PR @fi3ework, sorry for the testing issues

TobiasMelen pushed a commit to TobiasMelen/vite that referenced this pull request May 3, 2021
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.

EISDIR on vite build but not on vite - importing an image
4 participants