Tailwindcss-module: how to config tailwindcss with element UI (https://github.com/ElemeFE/element)

Created on 13 Nov 2019  路  5Comments  路  Source: nuxt-community/tailwindcss-module

Most helpful comment

All 5 comments

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 :(

Was this page helpful?
0 / 5 - 0 ratings