Closed JohnCampionJr closed 3 months ago
Hey, thanks for opening an issue on this repository. This message should answer exactly your question - https://github.com/nuxt-modules/tailwindcss/issues/838#issuecomment-2139672111 🙂
I saw that before posting.
That example shows loading a config. I need to load a custom tailwind plugin.
My plugin is currently loaded and then configured before being added to tailwind.
Ah you're right - give me a sec. I'll clone down the repo and provide you with a solution.
Thank you so much!!
No problem - https://github.com/jcamp-code/nuxt-icon-tw/pull/7
As with the comment with safelist regexes too, we make a template and provide that into our nuxt.options.tailwindcss
.
The plugin code is moved to runtime
directory as it's (sort of) used in the runtime lifecycle by the PostCSS loader (similar to the configMerger
file in this repo). I hope this helps!
Thanks again! Will you be publishing 6.12.1 soon or will this work on 6.12?
It should work with 6.12. Are we happy to close this issue?
Yes, it does work with 6.12.0; again, thank you!
Hi, I'm trying to update my nuxt module to v6.12.1 of your module and cannot figure out how to rework the plugin loading to avoid the HMR warning.
https://github.com/jcamp-code/nuxt-icon-tw/tree/nuxttw612
I had to switch to the nightly to even get this to run without a bunch of errors.
I recognize the issue is here, but I'm not sure how to rework this. https://github.com/jcamp-code/nuxt-icon-tw/blob/33685aa49d8165c335f5a9382aea0e62d741564b/src/module.ts#L154
Any guidance would be appreciated.