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

open-props not tree-shaked #809

Open
hyperknot opened this issue Dec 15, 2024 · 2 comments
Open

open-props not tree-shaked #809

hyperknot opened this issue Dec 15, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@hyperknot
Copy link

hyperknot commented Dec 15, 2024

Describe the issue

I do something as simple as:

import { colors } from '@stylexjs/open-props/lib/colors.stylex'

const styles = stylex.create({
  base: {
    color: colors.indigo6,
  },
});

and I look at the built css, and all the colors are compiled in. That single line is 4500 characters long!

Expected behavior

Only the used color should be present in the compiled css.

Steps to reproduce

I'm using this in Vite with the following versions.

"@stylexjs/open-props": "^0.9.3",
"@stylexjs/stylex": "^0.9.3",
"vite-plugin-stylex": "^0.13.0"

Let me know if this is indeed a bug and then I'll try to make a minimal reproducible case here.

Test case

No response

Additional comments

No response

@hyperknot hyperknot added the bug Something isn't working label Dec 15, 2024
@nmn
Copy link
Contributor

nmn commented Dec 16, 2024

Thank you for filing this issue. This is a known issue but we forgot to prioritize it.

@hyperknot
Copy link
Author

Thank you for the reply, great to hear that!

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