Skip to content

fix(define-stylex): fix unwanted code hoist #987

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

Merged
merged 4 commits into from
Aug 20, 2025

Conversation

BeiyanYunyi
Copy link
Contributor

Description

Described in #986.

Linked Issues

#986

Copy link

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

Copy link

vercel bot commented Aug 19, 2025

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

Project Deployment Preview Updated (UTC)
vue-macros Ready Ready Preview Aug 20, 2025 2:20am

@BeiyanYunyi BeiyanYunyi changed the title test(define-stylex): add fixture fix(define-stylex): fix unwanted code hoist Aug 19, 2025
Copy link

pkg-pr-new bot commented Aug 19, 2025

Open in StackBlitz

@vue-macros/api

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

@vue-macros/astro

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

@vue-macros/better-define

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

@vue-macros/boolean-prop

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

@vue-macros/chain-call

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

@vue-macros/common

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

@vue-macros/config

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

@vue-macros/define-emit

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

@vue-macros/define-models

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

unplugin-vue-define-options

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

@vue-macros/define-prop

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

@vue-macros/define-props

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

@vue-macros/define-props-refs

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

@vue-macros/define-render

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

@vue-macros/define-slots

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

@vue-macros/define-stylex

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

@vue-macros/devtools

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

@vue-macros/eslint-config

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

@vue-macros/export-expose

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

@vue-macros/export-props

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

@vue-macros/export-render

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

@vue-macros/hoist-static

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

@vue-macros/jsx-directive

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

vue-macros

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

@vue-macros/named-template

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

@vue-macros/nuxt

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

@vue-macros/reactivity-transform

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

@vue-macros/script-lang

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

@vue-macros/setup-block

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

@vue-macros/setup-component

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

@vue-macros/setup-sfc

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

@vue-macros/short-bind

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

@vue-macros/short-emits

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

@vue-macros/short-vmodel

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

@vue-macros/test-utils

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

@vue-macros/volar

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

commit: 5591257

@sxzz
Copy link
Member

sxzz commented Aug 19, 2025

BTW, looks like https://github.com/HorusGoul/vite-plugin-stylex is not active maintained now. Is there any replacement?

@BeiyanYunyi BeiyanYunyi force-pushed the fix/define-stylex-unwanted-hoist branch from 38fc606 to 0da6031 Compare August 20, 2025 02:04
@BeiyanYunyi BeiyanYunyi marked this pull request as ready for review August 20, 2025 02:10
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Aug 20, 2025
@BeiyanYunyi BeiyanYunyi force-pushed the fix/define-stylex-unwanted-hoist branch from f1c5bdc to 5a84f8d Compare August 20, 2025 02:12
Copy link

dosubot bot commented Aug 20, 2025

Related Documentation

No published documentation to review for changes on this repository.
Write your first living document

How did I do? Any feedback?  Join Discord

@BeiyanYunyi BeiyanYunyi force-pushed the fix/define-stylex-unwanted-hoist branch from 5a84f8d to 5591257 Compare August 20, 2025 02:14
@BeiyanYunyi
Copy link
Contributor Author

BeiyanYunyi commented Aug 20, 2025

BTW, looks like https://github.com/HorusGoul/vite-plugin-stylex is not active maintained now. Is there any replacement?

There're 3 libraries for vite listed in stylex's official doc:

  • vite-plugin-stylex - as you mentioned and I've documented.
  • vite-plugin-stylex-dev - archived. Successor is listed below.
  • unplugin-stylex - I will try it later.

Currently, I'm using stylex-extend, which is the successor of vite-plugin-stylex-dev.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Aug 20, 2025
@sxzz sxzz merged commit c00a579 into vue-macros:main Aug 20, 2025
10 checks passed
@BeiyanYunyi BeiyanYunyi deleted the fix/define-stylex-unwanted-hoist branch August 20, 2025 06:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants