Skip to content

open-props not tree-shaked #809

Closed
Closed
@hyperknot

Description

@hyperknot

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions