Skip to content

Conversation

@schelmo
Copy link
Contributor

@schelmo schelmo commented Feb 27, 2024

Description

This tries to fix #16034 and adds a condition if publicDir is truthy

Additional context

does this needs a test? i couldn't find tests with publicDir set to false, and i couldn't figure out how to set it up.


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, especially the Pull Request Guidelines.
  • 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).
  • Update the corresponding documentation if needed.
  • Ideally, include relevant tests that fail without this PR but pass with it.

@bolt-new-by-stackblitz
Copy link

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

Copy link
Member

@sapphi-red sapphi-red left a comment

Choose a reason for hiding this comment

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

This was working in pre-5.1.0 because normalizePath('') is '.'. ea5fdeb changed normalizePath('') into ''.

@sapphi-red sapphi-red added p3-minor-bug An edge case that only affects very specific usage (priority) regression The issue only appears after a new release labels Feb 28, 2024
@miken32
Copy link

miken32 commented Mar 1, 2024

@sapphi-red thanks for the quick approval; when can we expect to see a 5.1.5 5.1.6 release with this fix?

@sapphi-red sapphi-red requested a review from patak-dev March 6, 2024 07:15
@sapphi-red
Copy link
Member

I guess in a week.

@sapphi-red
Copy link
Member

/ecosystem-ci run

@vite-ecosystem-ci
Copy link

@sapphi-red sapphi-red merged commit b6fb323 into vitejs:main Mar 11, 2024
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) regression The issue only appears after a new release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

building urls with new URL(...) doesn't work anymore in 5.1 when publicDir is set to false

3 participants