acidjazz / nuxt-tailvue

nuxt module for tailvue components
MIT License
41 stars 5 forks source link

Strange behaviour when in production #7

Open xavsio4 opened 2 years ago

xavsio4 commented 2 years ago

Hello, It is quite hard to explain. In dev everything works well. I'm only using the modal component. But anyhow, I'va added nuxt tailvue to the config file. When the site is generated (npm run generate) no links are accessible anymore and no input are accessible anymore.

When I remove the module inclusion: ['nuxt-tailvue', { all: true }],

And re generate, everything becomes accessible again. I really don't what causes that. Maybe a collision of what I'm using besides Nuxt. Maybe it's my configuration. In case someone trips on this strange behaviour....

cyrilcolinet commented 2 years ago

Hello @xavsio4 :)

I had the same issue few hours ago and i fixed it by adding node_modules/tv-*/dist/tv-*.umd.min.js in content array of the tailwind.config.js file (you can create it if don't exists) as said in README.md of the tailwue plugin. See the following file:

export default {
  theme: {},
  variants: {},
  plugins: [],
  purge: {
    content: [
      `components/**/*.{vue,js}`,
      `layouts/**/*.vue`,
      `pages/**/*.vue`,
      `plugins/**/*.{js,ts}`,
      `nuxt.config.{js,ts}`,
      `node_modules/tv-*/dist/tv-*.umd.min.js` // add this line
    ]
  }
}

After this line added, regenerate and all works fine. Enjoy !

Otrex commented 2 years ago

Thank... That does it