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

CSS Properties don't get written (esbuild) #492

Closed
jonnitto opened this issue Mar 14, 2024 · 1 comment
Closed

CSS Properties don't get written (esbuild) #492

jonnitto opened this issue Mar 14, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@jonnitto
Copy link

Describe the issue

I use esbuild togehter with stylex.defineVars. Sometimes the custom properties in :root get's written, but most of the time, the will not appear in the css file. Even when I run it with the build command, without a watcher.

I've got no clue, why this does this happen. No error in the cli, nothing.

Expected behavior

The custom properties gets written every time

Steps to reproduce

  1. Start using stylex.defineVars in a esbuild project. After some time, event without a change on the styles, to custom properties doesn't appear anymore.

Test case

No response

Additional comments

I don't know if this has something to do with #363

@jonnitto jonnitto added the bug Something isn't working label Mar 14, 2024
@nedjulius
Copy link
Contributor

nedjulius commented Mar 15, 2024

This seems to be a duplicate of #454. It's already fixed, but the fix is not published yet. In the meantime, you can try manually setting treeshakeCompensation option to true in the StyleX esbuild plugin options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants