Skip to content

fix(define-stylex): use attrs() instead of props() #990

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
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

BeiyanYunyi
Copy link
Contributor

@BeiyanYunyi BeiyanYunyi commented Aug 23, 2025

Description

#989

Linked Issues

closes #989

Additional context

Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link

vercel bot commented Aug 23, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
vue-macros Error Error Aug 25, 2025 7:42am

Copy link

pkg-pr-new bot commented Aug 23, 2025

Open in StackBlitz

@vue-macros/api

npm i https://pkg.pr.new/@vue-macros/api@990

@vue-macros/astro

npm i https://pkg.pr.new/@vue-macros/astro@990

@vue-macros/better-define

npm i https://pkg.pr.new/@vue-macros/better-define@990

@vue-macros/boolean-prop

npm i https://pkg.pr.new/@vue-macros/boolean-prop@990

@vue-macros/chain-call

npm i https://pkg.pr.new/@vue-macros/chain-call@990

@vue-macros/common

npm i https://pkg.pr.new/@vue-macros/common@990

@vue-macros/config

npm i https://pkg.pr.new/@vue-macros/config@990

@vue-macros/define-emit

npm i https://pkg.pr.new/@vue-macros/define-emit@990

@vue-macros/define-models

npm i https://pkg.pr.new/@vue-macros/define-models@990

unplugin-vue-define-options

npm i https://pkg.pr.new/unplugin-vue-define-options@990

@vue-macros/define-prop

npm i https://pkg.pr.new/@vue-macros/define-prop@990

@vue-macros/define-props

npm i https://pkg.pr.new/@vue-macros/define-props@990

@vue-macros/define-props-refs

npm i https://pkg.pr.new/@vue-macros/define-props-refs@990

@vue-macros/define-render

npm i https://pkg.pr.new/@vue-macros/define-render@990

@vue-macros/define-slots

npm i https://pkg.pr.new/@vue-macros/define-slots@990

@vue-macros/define-stylex

npm i https://pkg.pr.new/@vue-macros/define-stylex@990

@vue-macros/devtools

npm i https://pkg.pr.new/@vue-macros/devtools@990

@vue-macros/eslint-config

npm i https://pkg.pr.new/@vue-macros/eslint-config@990

@vue-macros/export-expose

npm i https://pkg.pr.new/@vue-macros/export-expose@990

@vue-macros/export-props

npm i https://pkg.pr.new/@vue-macros/export-props@990

@vue-macros/export-render

npm i https://pkg.pr.new/@vue-macros/export-render@990

@vue-macros/hoist-static

npm i https://pkg.pr.new/@vue-macros/hoist-static@990

@vue-macros/jsx-directive

npm i https://pkg.pr.new/@vue-macros/jsx-directive@990

vue-macros

npm i https://pkg.pr.new/vue-macros@990

@vue-macros/named-template

npm i https://pkg.pr.new/@vue-macros/named-template@990

@vue-macros/nuxt

npm i https://pkg.pr.new/@vue-macros/nuxt@990

@vue-macros/reactivity-transform

npm i https://pkg.pr.new/@vue-macros/reactivity-transform@990

@vue-macros/script-lang

npm i https://pkg.pr.new/@vue-macros/script-lang@990

@vue-macros/setup-block

npm i https://pkg.pr.new/@vue-macros/setup-block@990

@vue-macros/setup-component

npm i https://pkg.pr.new/@vue-macros/setup-component@990

@vue-macros/setup-sfc

npm i https://pkg.pr.new/@vue-macros/setup-sfc@990

@vue-macros/short-bind

npm i https://pkg.pr.new/@vue-macros/short-bind@990

@vue-macros/short-emits

npm i https://pkg.pr.new/@vue-macros/short-emits@990

@vue-macros/short-vmodel

npm i https://pkg.pr.new/@vue-macros/short-vmodel@990

@vue-macros/test-utils

npm i https://pkg.pr.new/@vue-macros/test-utils@990

@vue-macros/volar

npm i https://pkg.pr.new/@vue-macros/volar@990

commit: c07c228


### Vite

```sh
pnpm add @stylexjs/stylex vite-plugin-stylex
pnpm add @stylexjs/stylex @stylex-extend/core @stylex-extend/vite -D
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can unplugin-stylex work with this demo?

Copy link
Contributor Author

@BeiyanYunyi BeiyanYunyi Aug 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. I can't get it work even with its own example, without any modification. It seems like that the stylex.create call was not compiled at all.

However, its react example works. Maybe it have conflict with the @vitejs/plugin-vue plugin and thus cannot work with vue project.

@BeiyanYunyi BeiyanYunyi force-pushed the fix/define-stylex-use-attrs branch from ee77788 to 3cd56f4 Compare August 24, 2025 03:28
@BeiyanYunyi BeiyanYunyi force-pushed the fix/define-stylex-use-attrs branch from 3cd56f4 to a8d1900 Compare August 24, 2025 03:31
@BeiyanYunyi BeiyanYunyi marked this pull request as ready for review August 24, 2025 03:33
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. documentation Improvements or additions to documentation labels Aug 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[defineStyleX] className approach does not work in some case
2 participants