Replies: 2 comments
-
|
I was able to get Tailwind to work by adding a What does not work is using utility classes in the stories. I tried to change the module hook to add Happy for any feedback what I might be doing wrong. I can try to put together a StackBlitz environment demonstrating the issue. |
Beta Was this translation helpful? Give feedback.
-
|
I have no idea what I did differently, but it works now. 😱 Here's a playground: https://stackblitz.com/edit/github-3rwar8 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I created a Nuxt module based on https://github.com/nuxt/module-builder and placed a component in
src/runtime/components/MyBtn.vuewhere I use some Tailwind classes.In the root I created a
histoire.config.tswith the following config:In
srcI added a filehistoire-setup.tswith the following content:In
srcI also added atailwind.csswith the following content:Finally, in
srcI also have aMyBtn.story.vuethat imports theMyBtncomponent and the story uses Tailwind classes itself, too. However, none of the Tailwind classes work. Neither the ones in the component, nor the ones in the story.To check that everything is loaded properly, I added
html { background-color: lime; }to thetailwind.cssand inspecting thehtmlelement, I can see that the style is picked up, so thesetupFileworks and also thetailwind.cssis loaded.I also tried adding a
tailwind.config.tsin the root with the following content, but it didn't help:Any idea what I am doing wrong?
Beta Was this translation helpful? Give feedback.
All reactions