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(html): handle relative base in asset links #4558

Closed
wants to merge 1 commit into from
Closed

fix(html): handle relative base in asset links #4558

wants to merge 1 commit into from

Conversation

andylizi
Copy link
Contributor

@andylizi andylizi commented Aug 9, 2021

Description

Fixes #4517.


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.

@patak-dev
Copy link
Member

Hey @andylizi, sorry we didn't get to this PR before. For Vite v3 we're working to rework the way relative base works. We're going to bump the modern browsers target so we can start using new URL(path, import.meta.url). This allows us to implement

Would you be able to check #7644 and see if it works for your use case? I think we could take some of your tests here in case the PR already fixes #4517.

@andylizi
Copy link
Contributor Author

Would you be able to check #7644 and see if it works for your use case?

I tried it out using the reproduction steps in #4517, and strangely the first attempt failed (still wrong urls) but the second
and subsequent attempts succeed without any issue. I don't think I had actually changed anything between the attempts, so I'm not sure what had happened the first time…

@andylizi
Copy link
Contributor Author

Superseded by #7644.

@andylizi andylizi closed this May 18, 2022
@patak-dev
Copy link
Member

@andylizi let us know if you still see the issue you encountered in that last comment

@andylizi andylizi deleted the fix-4517 branch May 18, 2022 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Relative links not handled properly in nested html files
4 participants