loro-crdt 1.12.4 → 1.12.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/README.md +1 -1
- package/base64/index.js +86 -85
- package/base64/loro_wasm.d.ts +19 -19
- package/browser/index.js +4 -4
- package/browser/loro_wasm.d.ts +19 -19
- package/browser/loro_wasm.js +12 -12
- package/browser/loro_wasm_bg.js +80 -79
- package/browser/loro_wasm_bg.wasm +0 -0
- package/browser/loro_wasm_bg.wasm.d.ts +2 -2
- package/bundler/index.js +4 -4
- package/bundler/loro_wasm.d.ts +19 -19
- package/bundler/loro_wasm_bg.js +80 -79
- package/bundler/loro_wasm_bg.wasm +0 -0
- package/bundler/loro_wasm_bg.wasm.d.ts +2 -2
- package/nodejs/loro_wasm.d.ts +19 -19
- package/nodejs/loro_wasm.js +82 -81
- package/nodejs/loro_wasm_bg.wasm +0 -0
- package/nodejs/loro_wasm_bg.wasm.d.ts +2 -2
- package/package.json +46 -5
- package/web/loro_wasm.d.ts +21 -21
- package/web/loro_wasm.js +80 -79
- package/web/loro_wasm_bg.wasm +0 -0
- package/web/loro_wasm_bg.wasm.d.ts +2 -2
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -82,7 +82,7 @@ Load the source map in browser devtools; when devtools fetches the debug compani
|
|
|
82
82
|
|
|
83
83
|
## Bundler entries
|
|
84
84
|
|
|
85
|
-
Bare `import { LoroDoc } from "loro-crdt"`
|
|
85
|
+
Bare `import { LoroDoc } from "loro-crdt"` uses package conditional exports. Browser development builds can resolve the nested `browser` + `development` conditions to the bundler entry, while browser production builds can resolve the `browser` condition to a synchronous browser build that avoids Vite/Rolldown production chunk cycles around `.wasm` wrappers. A legacy `browser` string field also points to the browser entry for bundlers that still consult it. Runtimes that need native `.wasm` module imports can still use the `bundler` entry, and apps that prefer explicit async initialization can use `loro-crdt/web`.
|
|
86
86
|
|
|
87
87
|
Vite and Webpack understand `new URL("./loro_wasm_bg.wasm", import.meta.url)` and emit the WASM asset automatically. Plain esbuild and plain Rollup do not copy that asset by default. For those tools, either import `loro-crdt/base64` to inline the WASM into the JS bundle without top-level await, or keep the default `loro-crdt` import and copy `node_modules/loro-crdt/browser/loro_wasm_bg.wasm` next to the emitted JS bundle as a build step.
|
|
88
88
|
|