Open wasimkabir opened 3 years ago
I have had the same issue in production. I have tinkered with the purge setting of TailwindCSS but with no solution. Did you find a solution to this problem?
I have had the same issue in production. I have tinkered with the purge setting of TailwindCSS but with no solution. Did you find a solution to this problem?
No. I used another package for the task instead.
For anyone still looking for a solution, you should add the path to this module directory to the purge array in tailwind.config.js in your Nuxt root directory 👍
Can you please share the solution @mathieumagalhaes?
Sure @vinayakkulkarni, I used this purge configuration in tailwind.config.js
purge: {
enabled: process.env.NODE_ENV !== 'development',
content: [
'./static/**/*.html',
'./components/**/*.vue',
'./components/**/*.html',
'./layouts/**/*.vue',
'./layouts/**/*.html',
'./pages/**/*.vue',
'./pages/**/*.html',
path.resolve(
__dirname,
'./node_modules/vue-tailwind-picker/dist/*.js'
),
path.resolve(__dirname, './node_modules/vue-tailwind-picker/**/*.js'),
],
},
Sure @vinayakkulkarni, I used this purge configuration in tailwind.config.js
purge: { enabled: process.env.NODE_ENV !== 'development', content: [ './static/**/*.html', './components/**/*.vue', './components/**/*.html', './layouts/**/*.vue', './layouts/**/*.html', './pages/**/*.vue', './pages/**/*.html', path.resolve( __dirname, './node_modules/vue-tailwind-picker/dist/*.js' ), path.resolve(__dirname, './node_modules/vue-tailwind-picker/**/*.js'), ], },
I'll take a look at your solution and let you know if it's working for me or not.
I have a Nuxt app with vue-tailwind-picker, it's working fine in development mode, the date picker not rendering properly when I upload it to production. I have attached some screenshots to show my issue. Can anyone help me to solve the issue? I am pretty new to Vue and Nuxt community.
My nuxt.config.js
My v.tailwind.picker.js plugin file:
Also the rendered component