loading assets from node_modules #13138
Unanswered
hector-jaraba-NWSE
asked this question in
Q&A
Replies: 2 comments
-
As a workarround I ended adding
is there a way to tell Vite to look in the corresponding path ( it is trying to access this path in the css:
|
Beta Was this translation helpful? Give feedback.
0 replies
-
I have a similar issue, have you had any success since May? |
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
-
Describe the bug
I move from CRA to Vite.
I am using an external component library which is using some internal assets (images and fonts). Before moving from CRA everything was working fine, but now Vite is not loading the images in development mode.
It's trying to load them from node_modules/assets but the assets are placed in
node_modules/component-library/dist/assets
I am working on a monorepo with yarn and lerna, I don't know if it can be related as I have two levels of node_modules.
Once I do the build I have no issues. All the files are copied correctly into the asset folder.
I'm not using directly the assets in my code. The assets are being used by the library internally. I'm just using a component from the library which is using these internal assets.
This is my configuration file:
System Info
Used Package Manager
yarn
Logs
No response
Validations
Beta Was this translation helpful? Give feedback.
All reactions