Add PurgeCSS

This commit is contained in:
Oliver Davies 2019-08-12 02:47:00 +01:00
parent 1d50809a82
commit 37a63f0778
7 changed files with 759 additions and 535 deletions

View file

@ -20,6 +20,7 @@
"vue-router": "^3.1.0" "vue-router": "^3.1.0"
}, },
"devDependencies": { "devDependencies": {
"@fullhuman/postcss-purgecss": "^1.2.0",
"@vue/cli-plugin-babel": "^3.6.0", "@vue/cli-plugin-babel": "^3.6.0",
"@vue/cli-plugin-eslint": "^3.6.0", "@vue/cli-plugin-eslint": "^3.6.0",
"@vue/cli-plugin-unit-jest": "^3.6.3", "@vue/cli-plugin-unit-jest": "^3.6.3",

View file

@ -1,9 +1,16 @@
module.exports = { module.exports = {
parser: 'sugarss', parser: 'sugarss',
plugins: { plugins: [
'postcss-import': {}, require('postcss-import'),
tailwindcss: "./tailwind.config.js", require('tailwindcss'),
'postcss-nested': {}, require('postcss-nested'),
autoprefixer: {} require('autoprefixer'),
} process.env.NODE_ENV === 'production' && require('@fullhuman/postcss-purgecss')({
content: [
'./src/**/*.vue',
'./public/index.html',
],
defaultExtractor: content => content.match(/[A-Za-z0-9-_:/]+/g) || []
})
]
} }

View file

@ -0,0 +1 @@
@import './components/search-form.css'

View file

@ -1,2 +0,0 @@
@import 'components/links'
@import 'components/search-form'

View file

@ -1,6 +1,7 @@
@import 'tailwindcss/base' @import 'tailwindcss/base'
@import './base.css'
@import 'tailwindcss/components' @import 'tailwindcss/components'
@import 'custom-components' @import './components.css'
@import 'tailwindcss/utilities' @import 'tailwindcss/utilities'

1268
yarn.lock

File diff suppressed because it is too large Load diff