nuxt-modules / svg-sprite

Optimize SVG files and combine them into sprite
https://codesandbox.io/s/github/nuxt-community/svg-sprite-module/
MIT License
295 stars 41 forks source link

DS_Store & subcatalogs #316

Open focus-at opened 6 months ago

focus-at commented 6 months ago

1. Module trying read .DS_Store as svg

{ name: '-ds-store',                                                                                                                                                                     12:49:25
  sprite: 'icons',
  content: '\x00\x00\x00\x01Bud1\x00\x00\x18\x00\x00\x00\b\x00\x00\
  ...

2. Icons from subfolder inserted as:

href="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?..."

and output catalog not contains .output/public/_nuxt/categories.DREn5-o2.svg only js file

js file content:

const h="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cdefs%3e%3c/defs%3e%3csymbol%20id='berries'%20fill='currentColor'%20viewBox='0%200%2045%2052'%3e%3cpath%20d='M10.4%2016h4v4h-4zm0%208h4v4h-4zm8-4h4v4h-
...|

For root folder its ok:

icons.CSCOqA0I.js
content:

import"./entry.D3XzjcZA.js";const t=""+new URL("icons.DcEICiv2.svg",import.meta.url).href;export{t as default};

icons.DcEICiv2.svg