nextjs - 💡(How to fix) Fix turbopack doesn't support wasm files [11 comments, 7 participants]

Official PRs (…)
ON THIS PAGE

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vercel/next.js#84972Fetched 2026-04-08 02:17:49
View on GitHub
Comments
11
Participants
7
Timeline
23
Reactions
0
Author
Timeline (top)
commented ×11subscribed ×5labeled ×2mentioned ×2

Code Example

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 25.0.0: Wed Sep 17 21:41:26 PDT 2025; root:xnu-12377.1.9~141/RELEASE_ARM64_T6041
  Available memory (MB): 131072
  Available CPU cores: 16
Binaries:
  Node: 24.10.0
  npm: 11.6.0
  Yarn: N/A
  pnpm: 10.18.3
Relevant Packages:
  next: 16.0.0-beta.0
  eslint-config-next: N/A
  react: 19.2.0
  react-dom: 19.2.0
  typescript: 5.9.3
Next.js Config:
  output: standalone

---

webpack: (config) => {
    config.module.rules.push({
      test: /\.wasm/,
      type: 'asset/resource',
    })
    config.module.rules.push({
      test: /\.sql/,
      type: 'asset/source',
    })
    return config
  },
RAW_BUFFERClick to expand / collapse

Link to the code that reproduces this issue

https://codesandbox.io/p/devbox/zealous-stitch-k5zz5g

To Reproduce

import wasm file

Current vs. Expected behavior

Unknown module type This module doesn't have an associated type. Use a known file extension, or register a loader for it.

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 25.0.0: Wed Sep 17 21:41:26 PDT 2025; root:xnu-12377.1.9~141/RELEASE_ARM64_T6041
  Available memory (MB): 131072
  Available CPU cores: 16
Binaries:
  Node: 24.10.0
  npm: 11.6.0
  Yarn: N/A
  pnpm: 10.18.3
Relevant Packages:
  next: 16.0.0-beta.0
  eslint-config-next: N/A
  react: 19.2.0
  react-dom: 19.2.0
  typescript: 5.9.3
Next.js Config:
  output: standalone

Which area(s) are affected? (Select all that apply)

Turbopack

Which stage(s) are affected? (Select all that apply)

next dev (local)

Additional context

webpack works with this:

  webpack: (config) => {
    config.module.rules.push({
      test: /\.wasm/,
      type: 'asset/resource',
    })
    config.module.rules.push({
      test: /\.sql/,
      type: 'asset/source',
    })
    return config
  },

extent analysis

TL;DR

The issue can likely be fixed by configuring Turbopack to recognize and handle wasm files properly, similar to how Webpack is configured.

Guidance

  • The error message indicates that the module type for the wasm file is unknown, suggesting a configuration issue with Turbopack.
  • To verify the issue, try to import a wasm file in a Next.js project using Turbopack and observe if the same error occurs.
  • Compare the Webpack configuration that works with the current Turbopack configuration to identify potential differences in handling wasm files.
  • Consider adding a similar configuration for Turbopack to handle wasm files as assets, potentially using a plugin or loader.

Example

No explicit code example is provided due to the lack of direct Turbopack configuration details in the issue, but the Webpack example given can serve as a reference point for how to handle wasm files:

// Webpack configuration example
webpack: (config) => {
  config.module.rules.push({
    test: /\.wasm/,
    type: 'asset/resource',
  })
  // ...
}

A similar approach might be needed for Turbopack, but the exact implementation details are not provided in the issue.

Notes

The solution may depend on the specific version of Turbopack and Next.js being used, as well as any custom configurations or plugins that are in place.

Recommendation

Apply a workaround by configuring Turbopack to handle wasm files, potentially by using a plugin or loader similar to how it's done in Webpack, as the issue seems to be related to the configuration of Turbopack rather than a version issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

nextjs - 💡(How to fix) Fix turbopack doesn't support wasm files [11 comments, 7 participants]