mirror of
https://github.com/iconify/iconify.git
synced 2024-09-28 13:09:07 +00:00
chore: update tailwind plugin
This commit is contained in:
parent
7f09fc25ff
commit
721c6ae9b7
@ -2,7 +2,7 @@
|
|||||||
"name": "@iconify/tailwind",
|
"name": "@iconify/tailwind",
|
||||||
"description": "Iconify plugin for Tailwind CSS",
|
"description": "Iconify plugin for Tailwind CSS",
|
||||||
"author": "Vjacheslav Trushkin <cyberalien@gmail.com> (https://iconify.design)",
|
"author": "Vjacheslav Trushkin <cyberalien@gmail.com> (https://iconify.design)",
|
||||||
"version": "0.1.4",
|
"version": "1.0.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"main": "./dist/plugin.js",
|
"main": "./dist/plugin.js",
|
||||||
"types": "./dist/plugin.d.ts",
|
"types": "./dist/plugin.d.ts",
|
||||||
|
@ -13,7 +13,14 @@ export function addDynamicIconSelectors(options?: DynamicIconifyPluginOptions) {
|
|||||||
const prefix = options?.prefix || 'icon';
|
const prefix = options?.prefix || 'icon';
|
||||||
return plugin(({ matchComponents }) => {
|
return plugin(({ matchComponents }) => {
|
||||||
matchComponents({
|
matchComponents({
|
||||||
[prefix]: (icon: string) => getDynamicCSSRules(icon, options),
|
[prefix]: (icon: string) => {
|
||||||
|
try {
|
||||||
|
return getDynamicCSSRules(icon, options);
|
||||||
|
} catch (err) {
|
||||||
|
// Log error, but do not throw it
|
||||||
|
console.error(err.message);
|
||||||
|
}
|
||||||
|
},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user