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

@apply directives can't built properly in build & preview Nuxt 3 #1545

Closed
chrisnaadhi opened this issue Sep 5, 2022 · 5 comments
Closed
Labels

Comments

@chrisnaadhi
Copy link

chrisnaadhi commented Sep 5, 2022

Heyo!
It's my first time to open an issue in unocss.
Directive @apply work flawlessly on dev mode, but seems like the generated build on Nuxt 3 doesn't built properly with @apply directive.
Dev Mode :
dev time work

Built & Preview :
build time bug

While using --at-apply work flawlessly as intended on dev mode & built mode.

Reproduction :
Install Nuxt 3 with UnoCSS module then use @apply directive and built it with npm run build
made a repro : https://stackblitz.com/github/chrisnaadhi/apply-uno-repro

@chrisnaadhi chrisnaadhi changed the title Bug: @apply directives can't built properly in build & preview Nuxt 3 @apply directives can't built properly in build & preview Nuxt 3 Sep 5, 2022
@nguyenvuhoangbt
Copy link

@chrisnaadhi have you fixed it ? I ran into this problem on my site. If you manage to fix it, can you share with me ?

@chrisnaadhi
Copy link
Author

chrisnaadhi commented Oct 17, 2022

@chrisnaadhi have you fixed it ? I ran into this problem on my site. If you manage to fix it, can you share with me ?

@nguyenvuhoangbt i'm able to fix it by change the @apply to --at-apply
example :
@apply bg-red-300 text-center;
change to
--at-apply: bg-red-300 text-center;

@nguyenvuhoangbt
Copy link

@chrisnaadhi It works for me. Thank you so much

@stale
Copy link

stale bot commented Dec 16, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Dec 16, 2022
@stale stale bot closed this as completed Dec 23, 2022
@sibbng
Copy link
Member

sibbng commented Dec 24, 2022

This is fixed in v0.47.3

Related PR: #1930

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants