Skip to content

Commit e28bf90

Browse files
committed
Add cssnano for CSS minification in production builds and update documentation
1 parent b340422 commit e28bf90

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ lang: en
175175
- `postcss-cli` - PostCSS command-line interface
176176
- `postcss-import` - PostCSS plugin for @import resolution
177177
- `autoprefixer` - PostCSS plugin for vendor prefix automation
178+
- `cssnano` - CSS minification tool (activated only in production builds to optimize CSS file size)
178179

179180
## Important Conventions
180181

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"devDependencies": {
66
"@tailwindcss/typography": "^0.5.19",
77
"autoprefixer": "^10.4.23",
8+
"cssnano": "^7.1.2",
89
"postcss": "^8.5.6",
910
"postcss-cli": "^11.0.1",
1011
"postcss-import": "^16.1.1",

postcss.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,10 @@ module.exports = {
77
},
88
tailwindcss: {},
99
autoprefixer: {},
10+
...(process.env.JEKYLL_ENV === 'production' && {
11+
cssnano: {
12+
preset: 'default'
13+
}
14+
})
1015
}
1116
};

0 commit comments

Comments
 (0)