You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am finishing migration from react-scripts and craco to Rsbuild, and noticed strange details in output bundle. I use a lot of SVG images which are imported as react components but few of them are also located in build/static/svg directory. As an example, my svg imports look like this:
But one of these images (fd_pet.svg) is in result build directory as svg-file:
The rest two pictures on the screenshot are imported in other files the same way.
If I comment fd_pet.svg and don't use it anymore then it's removed from build/static/svg static directory. When I open a page I don't see requests to svg files located in static/svg directory so, I guess, all of them are located in resulting JS-chunks as react components and look like this:
All svg icons are present in UI, so everything works as expected.
But I wonder why few svg files are located in output directory. There is nothing special there.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I am finishing migration from
react-scripts
andcraco
to Rsbuild, and noticed strange details in output bundle. I use a lot of SVG images which are imported as react components but few of them are also located inbuild/static/svg
directory. As an example, my svg imports look like this:But one of these images (
fd_pet.svg
) is in result build directory as svg-file:The rest two pictures on the screenshot are imported in other files the same way.
If I comment
fd_pet.svg
and don't use it anymore then it's removed frombuild/static/svg
static directory. When I open a page I don't see requests to svg files located instatic/svg
directory so, I guess, all of them are located in resulting JS-chunks as react components and look like this:All svg icons are present in UI, so everything works as expected.
But I wonder why few svg files are located in output directory. There is nothing special there.
Just to compare:
fd_pet.svg
fd_styling.svg
This is my
rsbuild.config.ts
:Beta Was this translation helpful? Give feedback.
All reactions