[Bug] Next.js 14.0.4 every operation on TinyColor returns black #000000
Closed this issue · 7 comments
When doing a production build of next.js 14.0.4 (does not happen in 14.0.3 and below) whenever i construct a TinyColor, it is always considered as pure black. During the development build everything seems to work, but in production build it breaks.
I made an example on code sandbox with this issue here
to reproduce, run a build of the server npm run build
(you will see a console log of the #000000 color too) and then start it
thats really weird
hey @scttcper seems that the concatenate matcher regex seems to have an issue if you'll use templated strings. i faced the same problem using parcel…
I'm also gonna try to investigate later where this problem might be coming from, haven't had the time to yesterday
yeah i'd assume the problem is somewhere in format-input.ts
probably a regex like @michaellocher says in the stringInputToObject function. maybe swc is breaking them? I think both of those bundlers use swc where the demo website is using esbuild in production
See #249
Very good, i've tried it this afternoon as well and seems to be ok. Maybe we should check the possible issue with swc, and field an issue.