-
-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
27 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,8 +71,8 @@ Import maps supports [**trailing slash**](https://github.com/WICG/import-maps#pa | |
```json | ||
{ | ||
"imports": { | ||
"react-dom": "https://esm.sh/[email protected]?pin=v107&dev", | ||
"react-dom/": "https://esm.sh/[email protected]&pin=v107&dev/", | ||
"react-dom": "https://esm.sh/[email protected]?pin=v108&dev", | ||
"react-dom/": "https://esm.sh/[email protected]&pin=v108&dev/", | ||
} | ||
} | ||
``` | ||
|
@@ -242,11 +242,15 @@ To ensure stable and consistent behavior, you may want to pin the build version | |
The `?pin` query allows you to specify a specific build version of a module, which is an **immutable** cached version stored on the esm.sh CDN. | ||
```javascript | ||
import React from "https://esm.sh/[email protected]?pin=v107" | ||
import React from "https://esm.sh/react-dom?pin=v108" | ||
// or use version prefix | ||
import React from "https://esm.sh/v108/react-dom" | ||
``` | ||
By using the `?pin` query in the import statement, you can rest assured that the version of the module you're using will not change, even if updates are pushed to the esm.sh server. This helps ensure the stability and reliability of your application. | ||
|
||
For UI libraries like [React](https://reactjs.org/) and [Vue](https://vuejs.org/), esm.sh uses a special build version `stable` to ensure single version of the library is used in the whole application. | ||
|
||
## Global CDN | ||
|
||
<img width="150" align="right" src="./server/embed/assets/cf.svg"> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters