File tree 2 files changed +9
-3
lines changed
packages/preset-icons/src
2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ export function createPresetIcons(lookupIconLoader: (options: IconsOptions) => P
26
26
extraProperties = { } ,
27
27
customizations = { } ,
28
28
autoInstall = false ,
29
+ collectionsNodeResolvePath,
29
30
layer = 'icons' ,
30
31
unit,
31
32
} = options
@@ -37,6 +38,7 @@ export function createPresetIcons(lookupIconLoader: (options: IconsOptions) => P
37
38
scale,
38
39
customCollections,
39
40
autoInstall,
41
+ cwd : collectionsNodeResolvePath ,
40
42
// avoid warn from @iconify /loader: we'll warn below if not found
41
43
warn : undefined ,
42
44
customizations : {
Original file line number Diff line number Diff line change @@ -56,18 +56,23 @@ export interface IconsOptions {
56
56
/**
57
57
* Auto install icon sources package when the usages is detected
58
58
*
59
- * **WARNING**: only on `node` environment, on `browser` this option will be ignored .
59
+ * Only effective in Node.js environment.
60
60
*
61
61
* @default false
62
62
*/
63
63
autoInstall ?: boolean
64
+ /**
65
+ * Path to resolve the iconify collections in Node.js environment.
66
+ *
67
+ * @default process.cwd()
68
+ */
69
+ collectionsNodeResolvePath ?: string
64
70
/**
65
71
* Custom icon unit.
66
72
*
67
73
* @default `em`
68
74
*/
69
75
unit ?: string
70
-
71
76
/**
72
77
* Load icons from CDN. Should starts with `https://` and ends with `/`
73
78
*
@@ -76,7 +81,6 @@ export interface IconsOptions {
76
81
* - https://cdn.skypack.dev/
77
82
*/
78
83
cdn ?: string
79
-
80
84
/**
81
85
* Custom fetch function to provide the icon data.
82
86
*/
You can’t perform that action at this time.
0 commit comments