ReferenceError on client render in production build using SWC minifier #66237
Labels
bug
Issue was opened via the bug report template.
locked
Module Resolution
Module resolution (CJS / ESM, module resolving)
SWC
Related to minification/transpilation in Next.js.
Link to the code that reproduces this issue
https://github.com/georgwittberger-telekom-mms/nextjs-lyne-swc-error-repro
To Reproduce
npm run build
.npm run start
.Current vs. Expected behavior
Current behavior:
During client render a
ReferenceError
is thrown as soon the code attempts to use a certain module export. This is caused by the minified Webpack module exports referencing an identifier which does not exist (see additional context).Expected behavior:
No error. Minified JavaScript identifiers pointing to the correct values.
Provide environment information
Operating System: Platform: win32 Arch: x64 Version: Windows 10 Enterprise Available memory (MB): 32434 Available CPU cores: 16 Binaries: Node: 20.10.0 npm: N/A Yarn: N/A pnpm: N/A Relevant Packages: next: 14.2.3 eslint-config-next: 14.2.3 react: 18.3.1 react-dom: 18.3.1 typescript: 5.4.5 Next.js Config: output: export
Which area(s) are affected? (Select all that apply)
Module Resolution, SWC
Which stage(s) are affected? (Select all that apply)
next build (local)
Additional context
The following error appears in the browser console:
The identifier
e
which is missing here is the exportedisBrowser
function of the modulenode_modules/@sbb-esta/lyne-components/development/core/dom.js
.The text was updated successfully, but these errors were encountered: