chore: remove wasm from exclude list#714
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
WalkthroughUpdated Vite configs: the default template stops excluding Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Dev as Developer
participant Vite as Vite
participant Esbuild as esbuild (optimizeDeps)
participant Resolver as Module Resolver
participant WASM as @enclave-e3/wasm
Dev->>Vite: start dev server / build
Vite->>Esbuild: run optimizeDeps (pre-bundle)
Esbuild->>Resolver: resolve deps using exclude list
Note over Esbuild,Resolver: Default template — WASM is no longer excluded
Resolver-->>Esbuild: include WASM package
Esbuild->>WASM: pre-bundle WASM package
Esbuild-->>Vite: return optimized deps
Vite-->>Dev: serve app with bundled dependencies
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
templates/default/client/vite.config.ts (1)
20-21: AddesbuildOptions.target: 'esnext'tooptimizeDeps
@enclave-e3/wasmis declared inpackages/enclave-sdk/package.json:42and no othervite.config.tsstill excludes it; setting the esbuild target toesnextprevents errors on modern syntax and top-level await during pre-bundling:optimizeDeps: { + esbuildOptions: { target: 'esnext' }, exclude: ['@rollup/browser'], },examples/CRISP/client/vite.config.ts (1)
25-26: Good call removing wasm deps from exclude; consider forcing include if usage is dynamicIf
@enclave-e3/wasmis only dynamically imported (or only used in workers), Vite may skip pre-bundling. Optionally force it into pre-bundle to stabilize cold starts:optimizeDeps: { - esbuildOptions: { target: 'esnext' }, - exclude: ['@rollup/browser', '@noir-lang/noirc_abi', '@noir-lang/acvm_js'], + esbuildOptions: { target: 'esnext' }, + include: ['@enclave-e3/wasm'], // optional: ensure pre-bundling even if not a direct entry import + exclude: ['@rollup/browser', '@noir-lang/noirc_abi', '@noir-lang/acvm_js'], },Also, for consistency, mirror this
esbuildOptions.targetsetting in the default template (it currently lacks it).Please run a quick dev and build smoke locally to confirm esbuild’s pre-bundle doesn’t error on wasm imports and that runtime starts cleanly (no pre-bundle warnings about wasm).
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
examples/CRISP/client/vite.config.ts(1 hunks)templates/default/client/vite.config.ts(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
- GitHub Check: build_enclave_cli
- GitHub Check: integration_prebuild
- GitHub Check: build_sdk
- GitHub Check: rust_unit
- GitHub Check: test_net
- GitHub Check: test_contracts
d52af33 to
f119843
Compare
7a096dc to
df73850
Compare
Closes #713
Summary by CodeRabbit
Chores
Performance