-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
duplicate CSS <link> with renderBuiltUrl
#14463
Labels
Comments
|
renderBuiltUrl
renderBuiltUrl
This might be related to #13169. |
Yep, changing it to return { runtime: `new URL('/' + ${JSON.stringify(filename)}, document.baseURI).href` }; works.
|
9 tasks
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
Describe the bug
Specify
renderBuiltUrl
like this:then dynamic imports can lead to CSS links duplicated. For example, in the reproduction:

If the prefix is just '/' then I can simply use
base: '/'
; but the real situation for me is more complicated, where the prefix is not determined at build time and sometimes it is '/', so 'base' is not an option here.Reproduction
https://stackblitz.com/edit/vitejs-vite-cssjgy?file=vite.config.js
Steps to reproduce
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: