Skip to content
This repository was archived by the owner on May 8, 2021. It is now read-only.

Commit 6b69979

Browse files
author
Brandon Pittman
committed
Use plugin
1 parent 72e86f4 commit 6b69979

File tree

3 files changed

+8
-51
lines changed

3 files changed

+8
-51
lines changed

examples/gridsome/gridsome.config.js

+6-17
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,9 @@
1-
const purgecss = require('@fullhuman/postcss-purgecss')
2-
const tailwind = require('tailwindcss')
3-
4-
const postcssPlugins = [
5-
tailwind('./tailwind.config.js'),
6-
]
7-
8-
// add purgecss only when building for production
9-
if (process.env.NODE_ENV === 'production') postcssPlugins.push(purgecss())
10-
111
module.exports = {
122
siteName: 'Gridsome Tailwind Setup',
13-
css: {
14-
loaderOptions: {
15-
postcss: {
16-
plugins: postcssPlugins,
17-
},
3+
plugins: [
4+
{
5+
use: 'gridsome-plugin-tailwindcss',
186
},
19-
},
20-
}
7+
],
8+
}
9+

examples/gridsome/package.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
"explore": "gridsome explore"
88
},
99
"dependencies": {
10-
"@fullhuman/postcss-purgecss": "^1.2.0",
11-
"gridsome": "^0.6.0",
12-
"tailwindcss": "^1.0.3"
10+
"gridsome": "latest",
11+
"gridsome-plugin-tailwindcss": "latest"
1312
}
1413
}

examples/gridsome/purgecss.config.js

-31
This file was deleted.

0 commit comments

Comments
 (0)