From e6f7e7d84d536bb6c7cbaee24cf15f5dddea2e63 Mon Sep 17 00:00:00 2001 From: Theo Messenger-Jones Date: Mon, 20 May 2019 19:12:48 +0100 Subject: [PATCH] feat: add purge css for tailwind template --- template/_package.json | 1 + template/nuxt/nuxt.config.js | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/template/_package.json b/template/_package.json index 18ced3df1..6085cbd70 100644 --- a/template/_package.json +++ b/template/_package.json @@ -72,6 +72,7 @@ "eslint-plugin-prettier": "^3.0.1", "prettier": "^1.16.4"<% } %><% if (ui === 'tailwind') { %>, "autoprefixer": "^8.6.4", + "nuxt-purgecss": "^0.2.1", "tailwindcss": "^0.7.0"<% } else if (ui === 'vuetify') { %>, "stylus": "^0.54.5", "stylus-loader": "^3.0.2"<% } %><% if (test !== 'none') { %>, diff --git a/template/nuxt/nuxt.config.js b/template/nuxt/nuxt.config.js index 14d87487c..d2c983110 100644 --- a/template/nuxt/nuxt.config.js +++ b/template/nuxt/nuxt.config.js @@ -79,7 +79,9 @@ module.exports = { '@nuxtjs/bulma',<% } %><% if (ui === 'buefy') { %> // Doc: https://buefy.github.io/#/documentation 'nuxt-buefy',<% } %><% if (pwa === 'yes') { %> - '@nuxtjs/pwa',<% } %> + '@nuxtjs/pwa',<% } %><% if (ui === 'tailwind') { %> + // Doc: https://github.com/Developmint/nuxt-purgecss + 'nuxt-purgecss',<% } %> ], <% if (axios === 'yes') { %> /* @@ -89,6 +91,12 @@ module.exports = { axios: { },<% } %> + <% if (ui === 'tailwind') { %> + purgeCSS: { + // your settings here + // https://www.purgecss.com/ + }, + <% } %> /* ** Build configuration */