You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to purge CSS code like Bootstrap's using the following config (postcss.config.json) and Angular cli gives an error at PurgeCSS.isSelectorSafelistedDeep
t.test is not a function node_modules/purgecss/lib/purgecss.js:1:9639
To Reproduce
I have created an angular environment to describe the issue but the same goes for other frameworks in case the PostCSS config is JSON.
gkorakas-eli
changed the title
[Bug]: regex not recognised when using PostCSS json config (postcss.config.json)
[Bug]: regex not recognized when using PostCSS json config (postcss.config.json)
Jun 5, 2024
Describe the bug
According to the following commit, Angular supports PostCSS configuration only via json config files:
angular/angular-cli@7c522aa
I am trying to purge CSS code like Bootstrap's using the following config (postcss.config.json) and Angular cli gives an error at PurgeCSS.isSelectorSafelistedDeep
t.test is not a function
node_modules/purgecss/lib/purgecss.js:1:9639
To Reproduce
I have created an angular environment to describe the issue but the same goes for other frameworks in case the PostCSS config is JSON.
https://stackblitz.com/edit/angular-postcss-purgecss?file=src%2Fmain.ts
ng new my-app
npm run build
Expected Behavior
JSON config to be parsed correctly so the regex patterns inside
safelist.deep
andsafelist.greedy
are taken into consideration without giving error.Environment
Angular version 17.2 and above or another framework with postcss.config.json
Add any other context about the problem here
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: