Replies: 1 comment 6 replies
-
|
The A couple of ways to get the file verbatim: 1. Use a
|
Beta Was this translation helpful? Give feedback.
-
|
The A couple of ways to get the file verbatim: 1. Use a
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
TL;DR: When using the
new URL('./myfile.css', import.meta.url), is there a way to prevent vite from trying to resolveurl(...)in the css file?My use-case
Via monaco-vscode-api, VSCode webview are registered by extension, whose assets files are registered via the
new URL('./myfile.css', import.meta.url)syntax.Some VSCode extensions are injecting css files in the webviews, and that css NEEDS to be kept as-is, because a service-worker is used to retrieve the actual assets, and it fails if the path is rewritten.
Actual css:
Css after vite transformation:
For some reasons, it seems to be happening only in serve mode
It can be a vite configuration or a query parameter (line
inline,raw,worker...), I've tried them all, and nothing helps (exceptcommonjs-proxyfor some reasons, but it would be VERY hacky)Beta Was this translation helpful? Give feedback.
All reactions