NuxtN
Nuxt4mo ago
4 replies
Meorion

tailwind css cannot be used in the module

I added a hook to introduce tailwind but didn't seem to take effect

/modules/hello/runtime/components tailwind components use in the name of the class is still not effective.

nuxt.hook("vite:extend", async ({ config }) => {
    const plugin = await import("@tailwindcss/vite").then((m) => m.default);
    config.plugins ||= [];
    config.plugins.push(plugin());
});
Was this page helpful?