admin管理员组文章数量:1315044
For our Nuxt template site we have Tailwind running a custom CSS file. This is mostly editable via our CMS for different colors on different websites.
In cases of missing classnames or wrongly typed, Vite instantly picks up the missing class as an error 500 and completely ruins the page.
[plugin:vite:css] [postcss] <path_to_file>/ProductPrijsGrafiek.vue?vue&type=style&index=0&lang.css:7:5: The `dark:bg-grafiekHoverButtonn-light` class does not exist. If `dark:bg-grafiekHoverButtonn-light` is a custom class, make sure it is defined within a `@layer` directive.
I would like to catch this error and post it as an console.error.
In the vite / nitro options of my nuxt.config.ts file i was suggested to put a errorHandler array, but i got shut down pretty quickly by some vague error messages.
For information: I'm running Nuxt 3.15 in SSR mode.
Kind regards
本文标签: nuxtjsHow to fallback on custom Tailwind css classes combined with Vite in Nuxt3gtStack Overflow
版权声明:本文标题:nuxt.js - How to fallback on custom Tailwind css classes combined with Vite in Nuxt3> - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741970835a2407827.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论