我一直在研究顺风CSS,当我使用它时,感觉就像HTML中的写作风格。这使得这个库对我来说使用起来很笨拙。但当我看着它的时候,我有了一个想法。 而不是像这样使用顺风 <div class="p-4 flex text-lg">Something</div> 我是否可以使用一些CSS预处理器来实现这一点: // in html
<div class="some">Something</div>
// in css (with a preprocessor)
.some {
include: .p-4;
in
场景
我只是安装vite,因为我的nuxt应用程序变得非常慢。如10-30秒的热模块更换。
但是现在,我的组件中的顺风已经不再起作用了。
错误
[plugin:vite:css] Preprocessor dependency "sass" not found. Did you install it?
同样,如果我每次单击删除浏览器中的vite消息:
require is not defined
但是装了一台sass装载机?!
修复步骤
重新安装顺风和installedreinstalled sass-loaderinstalled pug pug-plain-loaderin