Skip to content

Commit 65ad10f

Browse files
recommend to use esm.sh as cdn
1 parent f34aa42 commit 65ad10f

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"module": "./dist/index.js",
1212
"types": "dist/types/index.d.ts",
1313
"unpkg": "dist/ionicons/ionicons.esm.js",
14+
"jsdelivr": "dist/ionicons/ionicons.esm.js",
1415
"exports": {
1516
".": {
1617
"types": "./dist/types/index.d.ts",

readme.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,16 @@ Also note that only visible icons are loaded, and icons that are "below the fold
2626
If you're using [Ionic Framework](https://ionicframework.com/), Ionicons is packaged by default, so no installation is necessary. Want to use Ionicons without Ionic Framework? Place the following `<script>` near the end of your page, right before the closing `</body>` tag, to enable them.
2727

2828
```html
29-
<script type="module" src="https://cdn.jsdelivr.net/npm/ionicons@latest"></script>
30-
<script nomodule src="https://cdn.jsdelivr.net/npm/ionicons@latest"></script>
29+
<script type="module" src="https://esm.sh/ionicons@latest"></script>
30+
<script nomodule src="https://esm.sh/ionicons@latest"></script>
3131
```
3232

3333
you can replace `latest` to pick any version of Ionicon, e.g.:
3434

3535
```html
36-
<script type="module" src="https://cdn.jsdelivr.net/npm/ionicons@7.4.1"></script>
37-
<script nomodule src="https://cdn.jsdelivr.net/npm/ionicons@7.4.1"></script>
36+
<script type="module" src="https://esm.sh/ionicons@7.4.1"></script>
37+
<script nomodule src="https://esm.sh/ionicons@7.4.1"></script>
38+
```
3839

3940
### Basic usage
4041

0 commit comments

Comments
 (0)