Skip to content

Commit

Permalink
chore(postcss): streamline postcss configuration and add `postcss-d…
Browse files Browse the repository at this point in the history
…iscard-unused` plugin

- Removed all `postcss` plugins from the `.postcssrc` file as they are covered by default via ParcelJS bundler.
- Added the `postcss-discard-unused` plugin to the `.postcssrc` file.

Changes summary:
- Streamlined `postcss` configuration by removing redundant plugins covered by ParcelJS bundler.
- Added the `postcss-discard-unused` plugin to optimize CSS output by removing unused styles.
  • Loading branch information
itsmartashub committed Feb 16, 2024
1 parent b9e8e0f commit f9d49ff
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
9 changes: 1 addition & 8 deletions .postcssrc
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
{
"plugins": {
"css-has-pseudo": true,
"postcss-selector-not": true,
"postcss-custom-properties": true,
"postcss-gap-properties": true,
"postcss-clamp": true,
"postcss-transform": {
"preserve": false
}
"postcss-discard-unused": {}
}
}
16 changes: 16 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 @@ -64,6 +64,7 @@
"adm-zip": "^0.5.10",
"parcel": "^2.11.0",
"postcss": "^8.4.32",
"postcss-discard-unused": "^6.0.2",
"postcss-preset-env": "^9.3.0",
"postcss-transform": "^0.0.2",
"rimraf": "^5.0.5",
Expand Down

0 comments on commit f9d49ff

Please sign in to comment.