@vizij/animation-react 0.0.2 → 0.0.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/README.md +21 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -46,6 +46,27 @@ yarn add @vizij/animation-react @vizij/animation-wasm react react-dom
|
|
|
46
46
|
|
|
47
47
|
During local development with linked WASM packages, ensure your bundler preserves symlinks and excludes `@vizij/animation-wasm` from pre-bundling (see the [`vizij-web` README](../../README.md#local-wasm-development) for a Vite example).
|
|
48
48
|
|
|
49
|
+
> **Bundler note:** `@vizij/animation-react` depends on `@vizij/animation-wasm`, which emits a `.wasm` artefact. Enable async WebAssembly and treat `.wasm` files as emitted assets in your bundler. For Next.js:
|
|
50
|
+
>
|
|
51
|
+
> ```js
|
|
52
|
+
> // next.config.js
|
|
53
|
+
> module.exports = {
|
|
54
|
+
> webpack: (config) => {
|
|
55
|
+
> config.experiments = {
|
|
56
|
+
> ...(config.experiments ?? {}),
|
|
57
|
+
> asyncWebAssembly: true,
|
|
58
|
+
> };
|
|
59
|
+
> config.module.rules.push({
|
|
60
|
+
> test: /\.wasm$/,
|
|
61
|
+
> type: "asset/resource",
|
|
62
|
+
> });
|
|
63
|
+
> return config;
|
|
64
|
+
> },
|
|
65
|
+
> };
|
|
66
|
+
> ```
|
|
67
|
+
>
|
|
68
|
+
> When overriding the wasm location, call `init("https://.../vizij_animation_wasm_bg.wasm")` with a string URL so Webpack does not wrap it in `RelativeURL`.
|
|
69
|
+
|
|
49
70
|
---
|
|
50
71
|
|
|
51
72
|
## Peer Dependencies
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vizij/animation-react",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"prepack": "pnpm run build && pnpm run test && pnpm run typecheck"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@vizij/animation-wasm": "^0.3.
|
|
40
|
+
"@vizij/animation-wasm": "^0.3.3",
|
|
41
41
|
"@vizij/value-json": "^0.1.0"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|