[catalog/css setup][xs]: removed purging css as it is not working as expected. Removed theme configs in tailwind config. Note that CSS asset in production is now 298kb which is a lot comparing to 4kb previously.

This commit is contained in:
anuveyatsu 2021-08-24 11:54:01 +06:00
parent 40b3f52564
commit 6bc36f9e3b
2 changed files with 1 additions and 20 deletions

View File

@ -1,17 +1,8 @@
const purgecss = [
'@fullhuman/postcss-purgecss',
{
content: ['./components/**/*.tsx', './pages/**/*.tsx'],
defaultExtractor: (content) => content.match(/[\w-/:]+(?<!:)/g) || [],
},
];
module.exports = {
plugins: [
'postcss-preset-env',
'postcss-import',
'tailwindcss',
'autoprefixer',
...(process.env.NODE_ENV === 'production' ? [purgecss] : []),
],
};

View File

@ -4,18 +4,8 @@ module.exports = {
mode: 'jit',
purge: false,
darkMode: false, // or 'media' or 'class'
theme: {
container: {
center: true,
},
extend: {
fontFamily: {
mono: ['Inconsolata', ...defaultTheme.fontFamily.mono],
},
},
},
variants: {
extend: {},
},
plugins: [require('@tailwindcss/typography'), require('@tailwindcss/forms')],
plugins: [require('@tailwindcss/forms')],
};