How to reference some static resources not from usual public folder without using import statement #15182
Unanswered
azarenkovgd
asked this question in
Q&A
Replies: 1 comment
-
I checked the documentation and specifically https://vitejs.dev/guide/assets#new-url-url-import-meta-url. |
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
-
I have a typescript monorepo with many packages. Most of them are just a set of components with stories, but one of them is an actual frontend. Lets name it "core" package. Everything is powered by vite.
I have some set of images that i want to use in several packages.
I could just place them in "core" public folder, but then a problem arises - it will only work for "core" package. All stories referencing aforementioned assets will be broken.
Is it possible to have multiple public folders for a package? (or otherwise solve this challenge)
Then I could create a separate package, put the icons I need in it, and then specify a path to it (while being able to add resources to the regular public folder).
I cannot just use one single public folder for every package as some of them contain specific configuration files that cannot be shared.
Beta Was this translation helpful? Give feedback.
All reactions