Skip to content

Commit

Permalink
perf(css): remove unused styles
Browse files Browse the repository at this point in the history
  • Loading branch information
shadow81627 committed Nov 30, 2019
1 parent 8b1bb5e commit 9da4cf9
Show file tree
Hide file tree
Showing 3 changed files with 101 additions and 0 deletions.
14 changes: 14 additions & 0 deletions nuxt.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const purgecss = require('@fullhuman/postcss-purgecss');
const pkg = require('./package');

module.exports = {
Expand Down Expand Up @@ -136,4 +137,17 @@ module.exports = {
}
},
},

postcss: {
plugins: [
purgecss({
content: [
'./pages/**/*.vue',
'./layouts/**/*.vue',
'./components/**/*.vue',
],
whitelist: ['html', 'body'],
}),
],
},
};
86 changes: 86 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"nuxt-i18n": "6.4.0"
},
"devDependencies": {
"@fullhuman/postcss-purgecss": "1.3.0",
"@lhci/cli": "0.3.4",
"@mdi/js": "4.6.95",
"@nuxtjs/eslint-config": "2.0.0",
Expand Down

0 comments on commit 9da4cf9

Please sign in to comment.