Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Next.js 14.0.4 every operation on TinyColor returns black #000000 #248

Closed
Specy opened this issue Jan 16, 2024 · 7 comments
Closed

Comments

@Specy
Copy link

Specy commented Jan 16, 2024

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

@scttcper
Copy link
Owner

thats really weird

@michaellocher
Copy link
Contributor

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…

@Specy
Copy link
Author

Specy commented Jan 17, 2024

I'm also gonna try to investigate later where this problem might be coming from, haven't had the time to yesterday

@scttcper
Copy link
Owner

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

@michaellocher
Copy link
Contributor

See #249

@scttcper
Copy link
Owner

tried out 4.0.3 and it looks like its working

@michaellocher
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants