Skip to content

Commit

Permalink
fix(preset-icons): upgrade @iconify/utils to fix encodeSvgForCss bug (
Browse files Browse the repository at this point in the history
  • Loading branch information
BTBMan committed Oct 9, 2022
1 parent bce243b commit 68409bc
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 5 deletions.
1 change: 1 addition & 0 deletions examples/vite-vue3/icons/icon.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions examples/vite-vue3/icons/multi-line-attr.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions examples/vite-vue3/src/App.vue
Expand Up @@ -4,5 +4,7 @@
<div text-green5 text-lg>
Hello UnoCSS + Vue
</div>
<div i-custom-icon />
<div i-custom-multi-line-attr />
</div>
</template>
7 changes: 7 additions & 0 deletions examples/vite-vue3/vite.config.ts
@@ -1,9 +1,13 @@
import { resolve } from 'path'
import { defineConfig } from 'vite'
import Vue from '@vitejs/plugin-vue'
import UnoCSS from 'unocss/vite'
import presetAttributify from '@unocss/preset-attributify'
import presetIcons from '@unocss/preset-icons'
import presetUno from '@unocss/preset-uno'
import { FileSystemIconLoader } from '@iconify/utils/lib/loader/node-loaders'

const iconDirectory = resolve(__dirname, 'icons')

// https://vitejs.dev/config/
export default defineConfig({
Expand All @@ -21,6 +25,9 @@ export default defineConfig({
'display': 'inline-block',
'vertical-align': 'middle',
},
collections: {
custom: FileSystemIconLoader(iconDirectory),
},
}),
],
}),
Expand Down
2 changes: 1 addition & 1 deletion packages/preset-icons/package.json
Expand Up @@ -51,7 +51,7 @@
"stub": "unbuild --stub"
},
"dependencies": {
"@iconify/utils": "^2.0.0",
"@iconify/utils": "^2.0.1",
"@unocss/core": "workspace:*",
"ohmyfetch": "^0.4.19"
},
Expand Down
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 68409bc

Please sign in to comment.