unplugin-icons
Advanced tools
Comparing version 0.13.0 to 0.13.1
{ | ||
"name": "unplugin-icons", | ||
"version": "0.13.0", | ||
"version": "0.13.1", | ||
"description": "Access thousands of icons as components on-demand universally", | ||
@@ -93,30 +93,30 @@ "homepage": "https://github.com/antfu/unplugin-icons", | ||
"@antfu/install-pkg": "^0.1.0", | ||
"@antfu/utils": "^0.4.0", | ||
"@iconify/utils": "^1.0.20", | ||
"@antfu/utils": "^0.5.0", | ||
"@iconify/utils": "^1.0.23", | ||
"debug": "^4.3.3", | ||
"kolorist": "^1.5.1", | ||
"local-pkg": "^0.4.0", | ||
"unplugin": "^0.2.21" | ||
"local-pkg": "^0.4.1", | ||
"unplugin": "^0.3.2" | ||
}, | ||
"devDependencies": { | ||
"@antfu/eslint-config": "^0.14.0", | ||
"@iconify/json": "^2.0.15", | ||
"@antfu/eslint-config": "^0.16.1", | ||
"@iconify/json": "^2.0.34", | ||
"@iconify/types": "^1.0.12", | ||
"@svgr/core": "^6.1.2", | ||
"@svgr/core": "^6.2.1", | ||
"@types/debug": "^4.1.7", | ||
"@types/node": "^17.0.4", | ||
"@typescript-eslint/eslint-plugin": "^5.8.0", | ||
"@vue/compiler-sfc": "^3.2.26", | ||
"@types/node": "^17.0.16", | ||
"@typescript-eslint/eslint-plugin": "^5.11.0", | ||
"@vue/compiler-sfc": "^3.2.30", | ||
"bumpp": "^7.1.1", | ||
"cross-env": "^7.0.3", | ||
"eslint": "^8.5.0", | ||
"esno": "^0.13.0", | ||
"rollup": "^2.62.0", | ||
"tsup": "^5.11.9", | ||
"typescript": "^4.5.4", | ||
"vite": "^2.7.6", | ||
"vitest": "^0.0.113" | ||
"eslint": "^8.8.0", | ||
"esno": "^0.14.1", | ||
"rollup": "^2.67.1", | ||
"tsup": "^5.11.13", | ||
"typescript": "^4.5.5", | ||
"vite": "^2.7.13", | ||
"vitest": "^0.2.8" | ||
}, | ||
"peerDependencies": { | ||
"@svgr/core": "^5.5.0", | ||
"@svgr/core": ">=5.5.0", | ||
"@vue/compiler-sfc": "^3.0.2", | ||
@@ -123,0 +123,0 @@ "vue-template-compiler": "^2.6.12", |
@@ -253,2 +253,40 @@ # unplugin-icons | ||
<details> | ||
<summary>Next.js</summary><br> | ||
The `unplugin-icons` plugin should be configured on `next.config.js` configuration file: | ||
```js | ||
/** @type {import('next').NextConfig} */ | ||
module.exports = { | ||
reactStrictMode: true, | ||
webpack(config) { | ||
config.plugins.push( | ||
require('unplugin-icons/webpack')({ | ||
compiler: 'jsx', | ||
jsx: 'react', | ||
}), | ||
); | ||
return config; | ||
}, | ||
}; | ||
``` | ||
Check instructions in the `Frameworks -> React` section below if you faced module import errors. | ||
⚠️ **Warning:** to import an icon is necessary to explicitly add the `.jsx` extension to the import path, so that Next.js knows how to load it, by example: | ||
```ts | ||
import IconArrowRight from '~icons/dashicons/arrow-right.jsx'; | ||
// ^-- write `.jsx` to avoid | ||
// https://github.com/antfu/unplugin-icons/issues/103 | ||
// ...some code later | ||
<IconArrowRight /> | ||
``` | ||
See inside of `examples/next` for a working example project. | ||
<br></details> | ||
###### Frameworks | ||
@@ -424,3 +462,3 @@ | ||
From `v0.12.24` you can also provide a transform callback to `FileSystemIconLoader`. | ||
From `v0.13` you can also provide a transform callback to `FileSystemIconLoader`. | ||
@@ -466,3 +504,3 @@ ```ts | ||
> 💡 SVG Authoring Tips: | ||
> - To make your icons color adaptable, set `fill="currentColor"` for `stroke="currentColor"` in your SVG. | ||
> - To make your icons color adaptable, set `fill="currentColor"` or `stroke="currentColor"` in your SVG. | ||
> - Leave the `height` and `width` unspecified, we will set them for you. | ||
@@ -488,3 +526,3 @@ | ||
From version `v0.12.24` you can also customize each icon using `iconCustomizer` configuration option or using query params when importing them. | ||
From `v0.13` you can also customize each icon using `iconCustomizer` configuration option or using query params when importing them. | ||
@@ -551,7 +589,7 @@ The `query` param will take precedence over `iconCustomizer` and `iconCustomizer` over `configuration`. | ||
<template> | ||
<!-- width=4em and width=4em --> | ||
<!-- width=4em and height=4em --> | ||
<mdi-alarm-off /> | ||
<!-- width=4em and width=4em --> | ||
<!-- width=4em and height=4em --> | ||
<MdiAlarmOff /> | ||
<!-- width=1em and width=1em --> | ||
<!-- width=1em and height=1em --> | ||
<MdiAlarmOff2 /> | ||
@@ -588,3 +626,5 @@ </template> | ||
Components({ | ||
resolvers: IconsResolver(), | ||
resolvers: [ | ||
IconsResolver() | ||
], | ||
}), | ||
@@ -640,3 +680,5 @@ Icons(), | ||
Components({ | ||
resolvers: IconsResolver(), | ||
resolvers: [ | ||
IconsResolver(), | ||
] | ||
}), | ||
@@ -643,0 +685,0 @@ Icons(), |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
73076
815
0
+ Added@svgr/babel-plugin-add-jsx-attribute@8.0.0(transitive)
+ Added@svgr/babel-plugin-remove-jsx-attribute@8.0.0(transitive)
+ Added@svgr/babel-plugin-remove-jsx-empty-expression@8.0.0(transitive)
+ Added@svgr/babel-plugin-replace-jsx-attribute-value@8.0.0(transitive)
+ Added@svgr/babel-plugin-svg-dynamic-title@8.0.0(transitive)
+ Added@svgr/babel-plugin-svg-em-dimensions@8.0.0(transitive)
+ Added@svgr/babel-plugin-transform-react-native-svg@8.1.0(transitive)
+ Added@svgr/babel-plugin-transform-svg-component@8.0.0(transitive)
+ Added@svgr/babel-preset@8.1.0(transitive)
+ Added@svgr/core@8.1.0(transitive)
+ Addedargparse@2.0.1(transitive)
+ Addedcosmiconfig@8.3.6(transitive)
+ Addeddot-case@3.0.4(transitive)
+ Addedjs-yaml@4.1.0(transitive)
+ Addedlower-case@2.0.2(transitive)
+ Addedno-case@3.0.4(transitive)
+ Addedsnake-case@3.0.4(transitive)
+ Addedtslib@2.7.0(transitive)
+ Addedunplugin@0.3.3(transitive)
- Removed@antfu/utils@0.4.0(transitive)
- Removed@svgr/babel-plugin-add-jsx-attribute@5.4.0(transitive)
- Removed@svgr/babel-plugin-remove-jsx-attribute@5.4.0(transitive)
- Removed@svgr/babel-plugin-remove-jsx-empty-expression@5.0.1(transitive)
- Removed@svgr/babel-plugin-replace-jsx-attribute-value@5.0.1(transitive)
- Removed@svgr/babel-plugin-svg-dynamic-title@5.4.0(transitive)
- Removed@svgr/babel-plugin-svg-em-dimensions@5.4.0(transitive)
- Removed@svgr/babel-plugin-transform-react-native-svg@5.4.0(transitive)
- Removed@svgr/babel-plugin-transform-svg-component@5.5.0(transitive)
- Removed@svgr/babel-preset@5.5.0(transitive)
- Removed@svgr/core@5.5.0(transitive)
- Removed@svgr/hast-util-to-babel-ast@5.5.0(transitive)
- Removed@svgr/plugin-jsx@5.5.0(transitive)
- Removed@types/parse-json@4.0.2(transitive)
- Removed@types/throttle-debounce@2.1.0(transitive)
- Removedcosmiconfig@7.1.0(transitive)
- Removedsvg-parser@2.0.4(transitive)
- Removedunplugin@0.2.21(transitive)
- Removedyaml@1.10.2(transitive)
Updated@antfu/utils@^0.5.0
Updated@iconify/utils@^1.0.23
Updatedlocal-pkg@^0.4.1
Updatedunplugin@^0.3.2