Open dominique-mueller opened 4 years ago
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.
Not stale.
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.
Not stale.
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.
Not stale.
Overall, this isn't critical
It's critical when using Service Worker. Because SVG files also included in self.__WB_MANIFEST
value which contains URLs to precache. That means browsers will send requests to precache all these SVG files which don't need at all
Intro
SVG files can be imported as React component, and thus inlined into the bundle, using the following syntax:
Actual behaviour
Although inlined, the original SVG files will still be processed (by Webpack?) and end up
build/static/media
folderasset-manifest.json
fileOverall, this isn't critical - it only means that unused files end up in the
build
folder. Nevertheless, it's a very confusing behaviour, developers might assume those files are being used or even that SVGs imported the way described above are not being inlined.Expected behaviour
The expected behaviour is that inlined resources do not end up in the build folder, resulting in a smaller and clean
build
folder.Related