Combining tailwind and element ui in productions seems impossible. I have been trying to get it working for 2 weeks to no avail. works fine in dev but not production with nuxt generate.
I have it running fine in production, but you need to deactivate purgeCss in your nuxt.config.js:
purgeCSS: {
enabled: false,
},
Instead of deactivating PurgeCSS entirely whitelisting can be used as follows in nuxt.config.js:
/*
** purgeCSS module configuration
** See https://github.com/Developmint/nuxt-purgecss#options
*/
purgeCSS: {
whitelistPatterns: [/^el-/],
},
@hartmut-co-uk Not all classes in element is prefixed with el unfortunately :(
New tailwindcss v1.4 purge 馃帀 馃巿 comes to the rescue!!!
https://github.com/hartmut-co-uk/nuxt-tailwind14-element-example
Preveiw: https://hartmut-co-uk.github.io/nuxt-tailwind14-element-example/
Most helpful comment
New tailwindcss v1.4 purge 馃帀 馃巿 comes to the rescue!!!
https://github.com/hartmut-co-uk/nuxt-tailwind14-element-example
Preveiw: https://hartmut-co-uk.github.io/nuxt-tailwind14-element-example/