如何在我们的Nuxt模块中使用其他模块,例如Tailwindcss?

huangapple go评论54阅读模式
英文:

How to use other modules like Tailwindcss in our Nuxt module?

问题

我正在尝试构建一个使用tailwindcss的Nuxt模块。我不知道如何导入它,以便运行时目录中的组件可以使用tailwindcss的类。

英文:

I am trying to build a nuxt module that uses tailwindcss. I don't know how to import it so that the component in runtime dir can use tailwindcss classes.

答案1

得分: 0

在Nuxt文档中搜索了很多后,我注意到没有关于这方面的指南。在我找到如何做的方法后,我在Nuxt存储库上创建了一个PR并为他们的文档做出了贡献。所以,答案是你可以使用Nuxt Kit的installModule实用工具来在你的模块中导入其他模块。你可以在这里查看文档。

英文:

After searching a lot in the Nuxt documentation, I noticed that there was no guide for this. After I found out how to do it, I created a PR on the Nuxt repository and contributed to their documentation. So, the answer is that you can use Nuxt Kit's installModule utility to import other modules in your module. You can view the documentation here

huangapple
  • 本文由 发表于 2023年7月6日 19:54:58
  • 转载请务必保留本文链接:https://go.coder-hub.com/76628566.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定