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

Failed to load relative external URL from HTML #13145

Closed
leonheess opened this issue May 10, 2023 · 4 comments
Closed

Failed to load relative external URL from HTML #13145

leonheess opened this issue May 10, 2023 · 4 comments
Labels
duplicate This issue or pull request already exists

Comments

@leonheess
Copy link

leonheess commented May 10, 2023

Describe the bug

I have relative URLs in my index.html. They are marked as external. Still, Vite using the vite command says

Failed to load url /xxx (resolved id: /xxx). Does the file exist?

There is already a separate issue that URLs which are marked as external are rewritten at all: #11017

Reproduction

https://stackblitz.com/edit/vitejs-vite-gvcugb

Steps to reproduce

  1. Open Stackblitz
  2. Run command vite
  3. Observe Failed to load url /modules/module1 (resolved id: /modules/module1). Does the file exist?

System Info

System:
    OS: Windows 10 10.0.19044
    CPU: (16) x64 11th Gen Intel(R) Core(TM) i9-11950H @ 2.60GHz
    Memory: 103.00 GB / 127.21 GB
  Binaries:
    Node: 18.14.2 - ~\AppData\Local\Volta\tools\image\node\18.14.2\node.EXE
    Yarn: 1.22.19 - ~\AppData\Local\Volta\tools\image\yarn\1.22.19\bin\yarn.CMD
    npm: 9.5.0 - ~\AppData\Local\Volta\tools\image\node\18.14.2\npm.CMD
  Browsers:
    Edge: Spartan (44.19041.1266.0), Chromium (112.0.1722.48)
    Internet Explorer: 11.0.19041.1566
  npmPackages:
    @vitejs/plugin-vue: ^4.2.1 => 4.2.1
    vite: ^4.3.5 => 4.3.5

Used Package Manager

pnpm

@stackblitz
Copy link

stackblitz bot commented May 10, 2023

Fix this issue in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

@sapphi-red
Copy link
Member

Duplicate of #12711

@sapphi-red sapphi-red marked this as a duplicate of #12711 May 13, 2023
@sapphi-red sapphi-red closed this as not planned Won't fix, can't repro, duplicate, stale May 13, 2023
@sapphi-red sapphi-red added duplicate This issue or pull request already exists and removed pending triage labels May 13, 2023
@leonheess leonheess changed the title Failed to load relative external URL Failed to load relative external URL from HTML May 14, 2023
@leonheess
Copy link
Author

How is that a valid duplicate? It should never even ty to resolve relative URLs during build...

@patak-dev
Copy link
Member

We don't yet have an option for external URLs that are respected in both dev and build. We're planning to add this feature soon. See #11854 (comment) and #6582.

@github-actions github-actions bot locked and limited conversation to collaborators Jun 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants