[fix][x]: purge css in prod mode (#40)
This commit is contained in:
parent
ba68632805
commit
a5a5e6e600
@ -19,6 +19,7 @@
|
||||
"dependencies": {
|
||||
"@apollo/client": "^3.0.2",
|
||||
"@apollo/react-hooks": "^3.1.5",
|
||||
"@fullhuman/postcss-purgecss": "^2.3.0",
|
||||
"apollo-cache-inmemory": "^1.6.6",
|
||||
"apollo-client": "^2.6.10",
|
||||
"apollo-link": "^1.2.14",
|
||||
|
||||
@ -1,4 +1,10 @@
|
||||
const tailwindcss = require('tailwindcss');
|
||||
const purgecss = [
|
||||
'@fullhuman/postcss-purgecss',
|
||||
{
|
||||
content: ['./components/**/*.tsx', './pages/**/*.tsx'],
|
||||
defaultExtractor: (content) => content.match(/[\w-/:]+(?<!:)/g) || [],
|
||||
},
|
||||
];
|
||||
|
||||
module.exports = {
|
||||
plugins: [
|
||||
@ -6,5 +12,6 @@ module.exports = {
|
||||
'postcss-import',
|
||||
'tailwindcss',
|
||||
'autoprefixer',
|
||||
...(process.env.NODE_ENV === 'production' ? [purgecss] : []),
|
||||
],
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user