-
Notifications
You must be signed in to change notification settings - Fork 297
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
Issue with Colorjs.io that seems to lead back to Vanilla Extract #899
Comments
Just debugged a bit in both the browser and node (with no knowledge of how VE works internally). The difference between browser and node is in getFormat (format) {
// ...
if (ret) {
ret = this.#processFormat(ret); // We end up here
return ret;
}
} In node with VE the compiled code looks like this: ret = __privateMethod(this, _processFormat, __create).call(this, ret); In the browser the var _processFormat, __create, _path, _getPath, __create;
// ...
__create = function(format) {
// Code of processFormat()
}
// ...
__create = function() {
// Code of getPath()
} Assuming that the file was transformed by esbuild (as Vite uses esbuild, but I don't know if there is any other magic going on): this was actually a bug in esbuild that was fixed over one year ago evanw/esbuild#1424 That's all I've found out so far. It's time to call it a day 😴 |
Thank you very much for the insight! If that's the case the bug was fixed in |
Just debugged further: Vite does not transform the file with esbuild but calls the And the |
That makes sense given the bug only manifests in |
Could anyone from the VE team look into this? IMO this bug opens a potentially infinite volume of bizarre issues and should probably be treated asap. |
Fixed in #973 |
Describe the bug
I have an issue where the Colorjs.io library
toString()
method outputs a wrong color format when used inside*.css.ts
files.I filed this issue originally here and there's some further information, but given the method seems to otherwise work well in pure node, it may be related to how VE builds the
*.css.ts
files. Any ideas what could be happening?Reproduction
https://github.com/mystrdat/colorjs-vanilla-test
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: