next build fails on an object with a key contains U+30FB #65237
Labels
bug
Issue was opened via the bug report template.
linear: next
Confirmed issue that is tracked by the Next.js team.
locked
SWC
Related to minification/transpilation in Next.js.
Link to the code that reproduces this issue
https://github.com/mythosil/nextjs-issue-20240501/blob/master/pages/index.js
To Reproduce
npm install
npm run build
Current vs. Expected behavior
When I build the project for reproduction with Node v20.11.0, I get:
When I build the project with Node v20.12.2, I don't get any errors, but browsers throw
Uncaught SyntaxError: Invalid or unexpected token
when I access the app.Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.5.0: Thu Jun 8 22:22:23 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T6020 Available memory (MB): 32768 Available CPU cores: 10 Binaries: Node: 20.11.0 npm: 10.2.4 Yarn: N/A pnpm: N/A Relevant Packages: next: 14.2.3 // Latest available version is detected (14.2.3). eslint-config-next: N/A react: 18.3.1 react-dom: 18.3.1 typescript: N/A Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
SWC
Which stage(s) are affected? (Select all that apply)
next build (local)
Additional context
It seems that minification removes quotes unexpectedly.
swcMinify: false
makes the build work properly.This problem happens when an object has a key with "・" (
U+30FB
KATAKANA MIDDLEDOT), like{ 'a・': '' }
.Similar issue here: evanw/esbuild#1599
The text was updated successfully, but these errors were encountered: