Skip to content

StyleX extraction: computed member access is dropped at the call site #664

Description

@refirst11

Using the Devup UI extractor over StyleX source (no StyleX babel or postcss
plugin), static member access resolves but computed member access is dropped at
the call site:

const styles = stylex.create({ base: { display: "inline-block", fontWeight: "500" } });
const colorStyles = stylex.create({ red: { color: "red" }, blue: { color: "blue" } });

<div
  {...stylex.props(
    styles.base,          // ✅ emitted
    colorStyles[color],   // ❌ dropped
    sizeStyles[size],     // ❌ dropped
  )}
/>

Every one of my 1,000 components renders with only the base atoms:

<div class="m n o">

The extraction itself is fine — devup-ui.css contains every variant atom
(.i{color:red}, .s{font-size:12px}, .v{padding:0}, …). They are just never
referenced:

classes defined in devup-ui.css : 34
used in index.html              : 15
never referenced                : 19

So the extractor handles both forms and only the call-site mapping misses the
computed one, which also leaves 19 unused rules in the stylesheet.

Versions: @devup-ui/react 1.0.40, @devup-ui/next-plugin 1.0.83, wasm 1.0.78,
Next.js 16.3.3 (Turbopack), React 19.2.4, Node 25.8.2, macOS arm64.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions