next-flight-loader
fails to produce valid JS when module has no exports
#72358
Labels
bug
Issue was opened via the bug report template.
Module Resolution
Module resolution (CJS / ESM, module resolving)
Webpack
Related to Webpack with Next.js.
Link to the code that reproduces this issue
https://codesandbox.io/p/devbox/zen-bas-rxwhwt?file=%2Fapp%2Fpage.tsx%3A2%2C1
To Reproduce
Module parse failed: Unexpected token...
Current vs. Expected behavior
I would expect that
next-flight-loader
produces JS that is validProvide environment information
Operating System: Platform: linux Arch: x64 Version: #1 SMP PREEMPT_DYNAMIC Sun Aug 6 20:05:33 UTC 2023 Available memory (MB): 4102 Available CPU cores: 2 Binaries: Node: 20.9.0 npm: 9.8.1 Yarn: 1.22.19 pnpm: 8.10.2 Relevant Packages: next: 15.0.2 // Latest available version is detected (15.0.2). eslint-config-next: N/A react: 19.0.0-beta-04b058868c-20240508 react-dom: 19.0.0-beta-04b058868c-20240508 typescript: 5.1.3 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Module Resolution, Webpack
Which stage(s) are affected? (Select all that apply)
next dev (local), next build (local)
Additional context
No response
The text was updated successfully, but these errors were encountered: