Skip to content

Commit

Permalink
Update library_initialization.md
Browse files Browse the repository at this point in the history
  • Loading branch information
pvh authored Nov 14, 2024
1 parent 9801b55 commit c2b4913
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions docs/library_initialization.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,11 @@ export default defineConfig({
If you'd rather use Automerge outwide of any build processes, you can use something like the following example:

```javascript
import * as AutomergeRepo from "https://esm.sh/@automerge/automerge-repo/slim?bundle-deps"
import { IndexedDBStorageAdapter } from "https://esm.sh/@automerge/automerge-repo-storage-indexeddb?bundle-deps"
import { BrowserWebSocketClientAdapter } from "https://esm.sh/@automerge/automerge-repo-network-websocket?bundle-deps"
import { MessageChannelNetworkAdapter } from "https://esm.sh/@automerge/automerge-repo-network-messagechannel?bundle-deps"
// This approach requires the initializeWasm export not yet found in the stable 1.2.1 release.
import * as AR from "https://esm.sh/@automerge/[email protected]/slim?bundle-deps"
import { IndexedDBStorageAdapter } from "https://esm.sh/@automerge/[email protected]?bundle-deps"
import { BrowserWebSocketClientAdapter } from "https://esm.sh/@automerge/[email protected]?bundle-deps"
import { MessageChannelNetworkAdapter } from "https://esm.sh/@automerge/[email protected]?bundle-deps"

await AutomergeRepo.initializeWasm(
fetch("https://esm.sh/@automerge/automerge/dist/automerge.wasm")
Expand Down

0 comments on commit c2b4913

Please sign in to comment.