Replies: 2 comments 1 reply
-
I think I've found the cause for this. Vite doesn't seem to support |
Beta Was this translation helpful? Give feedback.
1 reply
-
I'm seeing this too; trying to include web workers that are defined in a node_module package. These are also
... which seems related. I'm not quite sure what I'm doing wrong :) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to get the url of an asset in a node module. I'm using
?url
for this, butimport path from "some-module/asset.html?url";
gives meMissing "./asset.html?url" export in "some-module" package
, indicating that the vite plugin didn't trim the?url
postfix when looking for the file. I'm also publishingsome-module
myself here and I've tried to explicitly list the asset filename in the exports of the package.json of the module, to no avail. Is there any way to include assets into a vite build from a dependency?The package.json of some-module contains something like this:
I assume I'm doing something wrong as the example in the guide for
?url
is exactly for this usecase: an asset included from a dependency.Any asset that does not require explicitly importing it as a url does work, like CSS files.
Any help would be very much appreciated!
Beta Was this translation helpful? Give feedback.
All reactions