Skip to content

Commit f142da7

Browse files
authored
Update README.md (#589)
Added dynamic import syntax for loading from CDN.
1 parent 8ad8e61 commit f142da7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,15 @@ import { CreateMLCEngine } from "@mlc-ai/web-llm";
105105

106106
#### CDN Delivery
107107

108-
Thanks to [jsdelivr.com](https://www.jsdelivr.com/package/npm/@mlc-ai/web-llm), WebLLM can be imported directly through URL and work out-of-the-box on cloud development platforms like [jsfiddle.net](https://jsfiddle.net/) and [Codepen.io](https://codepen.io/):
108+
Thanks to [jsdelivr.com](https://www.jsdelivr.com/package/npm/@mlc-ai/web-llm), WebLLM can be imported directly through URL and work out-of-the-box on cloud development platforms like [jsfiddle.net](https://jsfiddle.net/), [Codepen.io](https://codepen.io/), and [Scribbler](https://scribbler.live):
109109

110110
```javascript
111111
import * as webllm from "https://esm.run/@mlc-ai/web-llm";
112112
```
113+
It can also be dynamicall imported as:
114+
```javascript
115+
const webllm = await import ("https://esm.run/@mlc-ai/web-llm");
116+
```
113117

114118
### Create MLCEngine
115119

0 commit comments

Comments
 (0)