Add PurgeCSS
This commit is contained in:
parent
1d50809a82
commit
37a63f0778
|
@ -20,6 +20,7 @@
|
|||
"vue-router": "^3.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@fullhuman/postcss-purgecss": "^1.2.0",
|
||||
"@vue/cli-plugin-babel": "^3.6.0",
|
||||
"@vue/cli-plugin-eslint": "^3.6.0",
|
||||
"@vue/cli-plugin-unit-jest": "^3.6.3",
|
||||
|
|
|
@ -1,9 +1,16 @@
|
|||
module.exports = {
|
||||
parser: 'sugarss',
|
||||
plugins: {
|
||||
'postcss-import': {},
|
||||
tailwindcss: "./tailwind.config.js",
|
||||
'postcss-nested': {},
|
||||
autoprefixer: {}
|
||||
}
|
||||
plugins: [
|
||||
require('postcss-import'),
|
||||
require('tailwindcss'),
|
||||
require('postcss-nested'),
|
||||
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) || []
|
||||
})
|
||||
]
|
||||
}
|
||||
|
|
1
src/assets/css/components.css
Normal file
1
src/assets/css/components.css
Normal file
|
@ -0,0 +1 @@
|
|||
@import './components/search-form.css'
|
|
@ -1,2 +0,0 @@
|
|||
@import 'components/links'
|
||||
@import 'components/search-form'
|
|
@ -1,6 +1,7 @@
|
|||
@import 'tailwindcss/base'
|
||||
@import './base.css'
|
||||
|
||||
@import 'tailwindcss/components'
|
||||
@import 'custom-components'
|
||||
@import './components.css'
|
||||
|
||||
@import 'tailwindcss/utilities'
|
||||
|
|
Loading…
Reference in a new issue