Skip to content

Commit

Permalink
Fix purgecss configuration for new status behavior (#662)
Browse files Browse the repository at this point in the history
Add all the attributes used for hiding skipped statuses to the purgecss
safelist to avoid stripping them from the stylesheet in production
builds. Because some of these values are dynamically generated, the
default logic didn't detect them.
  • Loading branch information
bluekeyes authored Dec 13, 2023
1 parent fe8278e commit b876485
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion postcss.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ module.exports = {
defaultExtractor: content => {
return content.match(/[\w-./]*\w/g) || [];
},
// status classes are dynamically generated
safelist: [
// status classes are dynamically generated
"approved", "disapproved", "pending", "skipped", "error",
// keep all selectors that relate to hidden statuses
"data-next-status", "data-hide-status",
],
}),
cssnano({
Expand Down

0 comments on commit b876485

Please sign in to comment.