next.js: Es2018 Unicode Property Escapes Not working
Bug report
Describe the bug
Reproduction: codesandbox.io/s/muddy-cookies-9jr6z?file=/pages/index.js
After upgrading to V 10.0.2 the ES2018 Unicode Property Escapes feature is not working anymore. The same works perfectly till V 10.0.1 Not sure if it is due to the impact of https://github.com/vercel/next.js/pull/18759
Expected behavior
Since the upgrade is not a major one, expecting the feature to work with out any issues.
System information
- OS: macOS,
- Browser NA
- Version of Next.js: [e.g. 10.0.2]
- Version of Node.js: [e.g. 12.18.2]
About this issue
- Original URL
- State: open
- Created 6 years ago
- Reactions: 13
- Comments: 18 (2 by maintainers)
Current workaround:
@babel/plugin-transform-unicode-regex:Might not be the best thing to do, but at least it fixes the issue 😄
cc @shirazz @timneutkens
I just had this issue on Next.js 14.2.3 when using
highlight.jsand made it work by adding the package to transpilePackages in the next config.Still occurring as of
Next@10.2.3. Adding@babel/plugin-transform-unicode-regexresulted ine.charCodeAt is not a functionwhen trying to compiledecamelize.I keep getting this regex error.
Nextjs 14.2.4 highlight.js 11.9.0
This bug is happening to us on Next.js 14.2.3. Any news on a fix? Could you help us applying the workaround? Is not clear enough how to apply it.
Thank you for your time.
This is still an issue. Adding a custom babel config breaks builds in 14 as the current documentation doesn’t explain how to extend babel config without overriding next’s default settings.
Awesome!! Let’s hope a proper fix lands on a future release. Haven’t got time to check in detail