Search code examples
nuxt.jstailwind-cssnuxt-module

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


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.


Solution

  • 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