You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using @ui5/webcomponents as a dependency, it has an internal usage of the new URL('xxx', import.meta.url) pattern. This works correctly for vite build, but fails for vite dev
When running the linked reproduction project with vite dev, the URL is resolved to
but this is not ideal since this is the default usage of the package and should work the same way as the build command works for JSON assets.
There is a similar issue reported #8427, but it it for .wasm assest which are not included by default. For .json assets it should work the same as the build command without any workarounds.
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
Describe the bug
When using
@ui5/webcomponents
as a dependency, it has an internal usage of thenew URL('xxx', import.meta.url)
pattern. This works correctly forvite build
, but fails forvite dev
When running the linked reproduction project with
vite dev
, the URL is resolved tobut the dev server returns the index.html page for it
wrong url:
the correct url is
Running the same code with
vite build
and serving thedist
folder works as expectedA workaround is the add the following config
but this is not ideal since this is the default usage of the package and should work the same way as the
build
command works for JSON assets.There is a similar issue reported #8427, but it it for
.wasm
assest which are not included by default. For.json
assets it should work the same as thebuild
command without any workarounds.Reproduction
https://github.com/Quafadas/my-vite-project
Steps to reproduce
Run
npm install
followed bynpm run dev
open the page and check the network request for
which returns the index.html content
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: