Closed shrpne closed 6 years ago
According to bundlephobia it seems like the bundle size went up after the change. Perhaps it is in the way I implemented the svg files. I will do some experimenting to see if there are more efficient ways.
@nathanreyes first I thought of using svg icons as css background-image with data:uri. This way js bundle size should not increase.
Svg in js is a good approach too, but because of it, js bundle have increased.
~4kb of svg assets + SvgIcon.vue
, it's fine for me
~12kb of svg-sprite-loader
+ svg-baker-runtime
, I think it's pretty huge
Maybe some other loader can do it without such overhead? Like svg-inline-loader
or vue-svg-loader
, i'm not sure.
You can see the difference in webpack-bundle-anayzer reports: 0.6.2 https://jsfiddle.net/gjj0eya5/ 0.6.1 https://jsfiddle.net/fgbr5ajp/
Please replace icon font with svg icons It will save ~15kb minified css.
Browser support of svg is same as vue: IE9+