Skip to content

Commit

Permalink
Update README.md (#589)
Browse files Browse the repository at this point in the history
Added dynamic import syntax for loading from CDN.
  • Loading branch information
gopi-suvanam authored Oct 4, 2024
1 parent 8ad8e61 commit f142da7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,15 @@ import { CreateMLCEngine } from "@mlc-ai/web-llm";

#### CDN Delivery

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/):
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):

```javascript
import * as webllm from "https://esm.run/@mlc-ai/web-llm";
```
It can also be dynamicall imported as:
```javascript
const webllm = await import ("https://esm.run/@mlc-ai/web-llm");
```

### Create MLCEngine

Expand Down

0 comments on commit f142da7

Please sign in to comment.