Skip to content

Commit

Permalink
Fiddle-frontend - Fix wasm build (#1562)
Browse files Browse the repository at this point in the history
<!-- ELLIPSIS_HIDDEN -->



> [!IMPORTANT]
> Add Webpack rule in `next.config.mjs` to handle `.wasm` files as
`asset/resource`.
> 
>   - **Webpack Configuration**:
> - Adds a rule in `next.config.mjs` to handle `.wasm` files as
`asset/resource`.
> - Ensures WebAssembly modules are processed correctly during the
build.
> 
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=BoundaryML%2Fbaml&utm_source=github&utm_medium=referral)<sup>
for c3db389. It will automatically
update as commits are pushed.</sup>

<!-- ELLIPSIS_HIDDEN -->
  • Loading branch information
aaronvg authored Mar 5, 2025
1 parent f53e0e8 commit 06774d2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions typescript/fiddle-frontend/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ const nextConfig = {
topLevelAwait: true,
}

config.module.rules.push({
test: /\.wasm$/,
type: 'asset/resource',
})

if (dev) {
config.devtool = 'eval-source-map'
}
Expand Down

0 comments on commit 06774d2

Please sign in to comment.