question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:3
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
chrisnaadhicommented, 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;

1reaction
nguyenvuhoangbtcommented, Oct 17, 2022

@chrisnaadhi It works for me. Thank you so much

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot add any custom directive (locally or globally) #1885
In nuxt 2 it's very simple to add new directives. I hope it's going to be the same with nuxt 3 eventually...
Read more >
nuxt.js - Not able to preview NuxtJs3 build - Stack Overflow
My Nuxt 3 Project is suddenly giving me some error after release of 3.0.0-rc.5, it used to work well and now i am...
Read more >
How to Implement Previews with Nuxt Applications using a ...
In this step by step beginners tutorial, you'll learn how to integrate Nuxt Previews using Strapi as the backend to preview content before ......
Read more >
Plugins directory - Nuxt
The plugins directory contains your Javascript plugins that you want to run before instantiating the root Vue.js Application.
Read more >
Creating Server-side Rendered Vue.js Apps Using Nuxt.js
Instead, it gets a bunch of pieces and instructions of how to put them all ... Nuxt will look for certain directories and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found