react-inlinesvg
Advanced tools
Comparing version 4.0.0-0 to 4.0.0
{ | ||
"name": "react-inlinesvg", | ||
"version": "4.0.0-0", | ||
"version": "4.0.0", | ||
"description": "An SVG loader for React", | ||
@@ -43,3 +43,5 @@ "author": "Gil Barbara <gilbarbara@gmail.com>", | ||
"*": { | ||
"provider": ["dist/provider.d.ts"] | ||
"provider": [ | ||
"dist/provider.d.ts" | ||
] | ||
} | ||
@@ -62,3 +64,3 @@ }, | ||
"@size-limit/preset-small-lib": "^8.2.6", | ||
"@swc/core": "^1.3.74", | ||
"@swc/core": "^1.3.75", | ||
"@testing-library/jest-dom": "^5.17.0", | ||
@@ -71,3 +73,3 @@ "@testing-library/react": "^14.0.0", | ||
"@types/node-fetch": "^2.6.4", | ||
"@types/react": "^18.2.18", | ||
"@types/react": "^18.2.19", | ||
"@types/react-dom": "^18.2.7", | ||
@@ -74,0 +76,0 @@ "browser-cache-mock": "^0.1.7", |
@@ -62,3 +62,4 @@ # react-inlinesvg | ||
**cacheRequests** {boolean} ▶︎ `true` | ||
Cache remote SVGs. | ||
Cache remote SVGs. | ||
Starting in version 4.x, you can also cache the files permanently, read more [below](#caching). | ||
@@ -141,11 +142,5 @@ **description** {string} | ||
The internal cache is exported as `cacheStore` if you need to debug or pre-cache some files. | ||
Since version 4.x, the `cacheStore` is an instance of the [Cache](src/cache.ts) class instead of a plain object. | ||
⚠️ Use it at your own risk. | ||
You can use the browser's cache to store the SVGs permanently. | ||
To set it up, wrap your app with the cache provider: | ||
### Persistent cache | ||
Starting with version 4.x, you can use the browser's [cache](https://developer.mozilla.org/en-US/docs/Web/API/Cache) to store the SVGs. | ||
To set it up, you need to wrap your app with the provider: | ||
```typescript | ||
@@ -152,0 +147,0 @@ import { createRoot } from 'react-dom/client'; |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
0
159181
198