Unable to use vue-tailwind in nuxt generated app
See original GitHub issueIn my nuxt.js project I am using the datepicker. I import the library as a plugin in this way:
/plugins/vue-tailwind.js
import Vue from 'vue'
import VueTailwind from 'vue-tailwind'
Vue.use(VueTailwind)
/nuxt.config.js
plugins: ['~plugins/vue-tailwind']
and the component works perfectly in development.
My problem is that the component is not rendered when I serve the app generated with
nuxt generate
I already tried to load the plugin this way:
{ src: '~plugins/vue-tailwind', mode: 'client' }
and also tried to put the component between client-only tag
<client-only>
<t-datepicker
v-model="date"
:max-date="today"
placeholder="Select a date"
date-format="Y-m-d"
user-format="d-M-Y"
/>
</client-only>
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Vue plugin not loaded on static site generated by nuxt
js project I am using a component from a Vue library called vue-tailwind. I import the library as a plugin in this way...
Read more >Install Tailwind CSS with Nuxt.js
Using npm, install tailwindcss and its peer dependencies, as well as @nuxt/postcss8 , and then run the init command to generate the tailwind.config.js...
Read more >How to add Tailwind CSS v3 to your Nuxt 3 application
In this tutorial, you will learn how to build a new Nuxt 3 application and use Tailwind CSS v3 in it. Once you...
Read more >Setting up Tailwind with Vue.js | Sanity.io guide
In this guide, you will add Tailwind to a Vue application.
Read more >Styling Vue.js components with VueTailwind - LogRocket Blog
js components using VueTailwind. Now that we've created our project, let's remove the default components and style the app's background to jazz ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
ok think that maybe the documentation is not clear think I’m gonna revisit it, meanwhile since version 2 of this library you need to manually import the components since any of them are added by default, if you are only using one component the best way to do it is like its explained here https://www.vue-tailwind.com/docs/installation#33-or-you-can-install-only-the-components-you-need, so for the datepicker the configuration in
/plugins/vue-tailwind.js
should look like this:@fparaggio @karanjamutahi let me know if that solves your problem so I can close this issue
Closing this since no more feedback received feel free to open again if still have the issue