Skip to content

Commit

Permalink
fix: support resolve icons from non-hoisted deps
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Feb 4, 2024
1 parent d806523 commit 25725f0
Show file tree
Hide file tree
Showing 6 changed files with 167 additions and 206 deletions.
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -26,7 +26,7 @@
"@antfu/eslint-config": "^2.6.4",
"@antfu/ni": "^0.21.12",
"@antfu/utils": "^0.7.7",
"@shikijs/markdown-it": "1.0.0-beta.3",
"@shikijs/markdown-it": "^1.0.0-beta.5",
"@slidev/cli": "workspace:*",
"@slidev/parser": "workspace:*",
"@slidev/types": "workspace:*",
Expand Down Expand Up @@ -59,7 +59,7 @@
"playwright-chromium": "^1.41.2",
"pnpm": "^8.15.1",
"rimraf": "^5.0.5",
"shiki": "1.0.0-beta.3",
"shiki": "^1.0.0-beta.5",
"simple-git-hooks": "^2.9.0",
"taze": "^0.13.2",
"tsup": "^8.0.1",
Expand Down
8 changes: 5 additions & 3 deletions packages/client/package.json
Expand Up @@ -20,11 +20,13 @@
},
"dependencies": {
"@antfu/utils": "^0.7.7",
"@iconify-json/carbon": "^1.1.28",
"@iconify-json/ph": "^1.1.11",
"@shikijs/vitepress-twoslash": "^1.0.0-beta.5",
"@slidev/parser": "workspace:*",
"@slidev/types": "workspace:*",
"@unhead/vue": "^1.8.10",
"@unocss/reset": "^0.58.4",
"@unocss/reset": "^0.58.5",
"@vueuse/core": "^10.7.2",
"@vueuse/math": "^10.7.2",
"@vueuse/motion": "^2.0.0",
Expand All @@ -40,10 +42,10 @@
"mermaid": "^10.8.0",
"monaco-editor": "^0.37.1",
"nanoid": "^5.0.5",
"prettier": "^3.2.4",
"prettier": "^3.2.5",
"recordrtc": "^5.6.2",
"resolve": "^1.22.8",
"unocss": "^0.58.4",
"unocss": "^0.58.5",
"vue": "^3.4.15",
"vue-router": "^4.2.5"
},
Expand Down
5 changes: 4 additions & 1 deletion packages/client/uno.config.ts
@@ -1,3 +1,4 @@
import { fileURLToPath } from 'node:url'
import {
defineConfig,
presetAttributify,
Expand Down Expand Up @@ -26,7 +27,9 @@ export default defineConfig({
presets: [
presetUno(),
presetAttributify(),
presetIcons(),
presetIcons({
collectionsNodeResolvePath: fileURLToPath(import.meta.url),
}),
presetTypography(),
],
transformers: [
Expand Down
2 changes: 2 additions & 0 deletions packages/slidev/node/plugins/preset.ts
@@ -1,6 +1,7 @@
import { join } from 'node:path'
import { existsSync } from 'node:fs'
import process from 'node:process'
import { fileURLToPath } from 'node:url'
import type { Plugin } from 'vite'
import Vue from '@vitejs/plugin-vue'
import VueJsx from '@vitejs/plugin-vue-jsx'
Expand Down Expand Up @@ -130,6 +131,7 @@ export async function ViteSlidevPlugin(

Icons({
defaultClass: 'slidev-icon',
collectionsNodeResolvePath: fileURLToPath(import.meta.url),
...iconsOptions,
}),

Expand Down
10 changes: 5 additions & 5 deletions packages/slidev/package.json
Expand Up @@ -55,12 +55,12 @@
"@mrdrogdrog/optional": "^1.2.1",
"@shikijs/markdown-it": "^1.0.0-beta.5",
"@shikijs/twoslash": "^1.0.0-beta.5",
"@shikijs/vitepress-twoslash": "1.0.0-beta.3",
"@shikijs/vitepress-twoslash": "^1.0.0-beta.5",
"@slidev/client": "workspace:*",
"@slidev/parser": "workspace:*",
"@slidev/types": "workspace:*",
"@unocss/extractor-mdc": "^0.58.4",
"@unocss/reset": "^0.58.4",
"@unocss/extractor-mdc": "^0.58.5",
"@unocss/reset": "^0.58.5",
"@vitejs/plugin-vue": "^5.0.3",
"@vitejs/plugin-vue-jsx": "^3.1.0",
"cli-progress": "^3.12.0",
Expand Down Expand Up @@ -100,8 +100,8 @@
"shiki": "^1.0.0-beta.5",
"sirv": "^2.0.4",
"typescript": "^5.3.3",
"unocss": "^0.58.4",
"unplugin-icons": "^0.18.3",
"unocss": "^0.58.5",
"unplugin-icons": "^0.18.5",
"unplugin-vue-components": "^0.26.0",
"unplugin-vue-markdown": "^0.26.0",
"uqr": "^0.1.2",
Expand Down

0 comments on commit 25725f0

Please sign in to comment.