Next.js 14.2.x bundler mangles \\b
in template literals
#70500
Labels
bug
Issue was opened via the bug report template.
linear: next
Confirmed issue that is tracked by the Next.js team.
Webpack
Related to Webpack with Next.js.
Link to the code that reproduces this issue
https://github.com/silas/nextjs-issue-70500.git
To Reproduce
npm install
npm run build
Current vs. Expected behavior
npm run build
should complete successfully.This is the difference between a working and non-working build:
The working version produces:
And the non-working version produces:
You can try the working build by running:
git checkout 592f5ba
npm run build
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 24.0.0: Mon Aug 12 20:52:31 PDT 2024; root:xnu-11215.1.10~2/RELEASE_ARM64_T6030 Available memory (MB): 36864 Available CPU cores: 12 Binaries: Node: 22.9.0 npm: 10.8.3 Yarn: 1.22.22 pnpm: 9.11.0 Relevant Packages: next: 14.2.13 // Latest available version is detected (14.2.13). eslint-config-next: N/A react: 18.3.1 react-dom: 18.3.1 typescript: 5.6.2 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Webpack
Which stage(s) are affected? (Select all that apply)
next build (local)
Additional context
This issue was uncovered in shikijs/shiki#784
It's possible this is related to webpack, but the upstream default settings for
webpack@4
andwebpack@5
don't cause this issue.Versions
It looks like this stopped working in 14.2.0-canary.66...14.2.0-canary.67:
The text was updated successfully, but these errors were encountered: