Turbopack doesn't have loadModule
on the loader interface
#78693
Labels
Turbopack
Related to Turbopack with Next.js.
Link to the code that reproduces this issue
https://github.com/Mad-Kat/turbopack-load-module
To Reproduce
loadModule
is undefined in the Turbopack loader context. If you run the same command withbuild
instead ofbuild:turbo
, the loader will work as expected.Current vs. Expected behavior
Expected Behavior
The
loadModule
method should be available in the Turbopack loader interface, just as it is in webpack loaders.Actual Behavior
When running under Turbopack,
this.loadModule
is undefined, causing the loader to throw an error.Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 24.4.0: Fri Apr 11 18:32:50 PDT 2025; root:xnu-11417.101.15~117/RELEASE_ARM64_T6041 Available memory (MB): 49152 Available CPU cores: 14 Binaries: Node: 22.15.0 npm: 10.9.2 Yarn: 4.9.1 pnpm: 10.2.1 Relevant Packages: next: 15.4.0-canary.15 // Latest available version is detected (15.4.0-canary.15). eslint-config-next: 15.4.0-canary.15 react: 19.1.0 react-dom: 19.1.0 typescript: 5.8.3 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Turbopack
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
Works correctly with webpack
The text was updated successfully, but these errors were encountered: