Skip to content
This repository has been archived by the owner on Feb 1, 2020. It is now read-only.

whitelistPatterns troubles on cascading #88

Open
laureProthais opened this issue Jan 9, 2020 · 0 comments
Open

whitelistPatterns troubles on cascading #88

laureProthais opened this issue Jan 9, 2020 · 0 comments

Comments

@laureProthais
Copy link

laureProthais commented Jan 9, 2020

Hello,

I have some troubles with whitelistPatterns option.

I want to whitelist all selectors containing a specific word slick so here is my configuration :

new PurgeCssPlugin({
      paths: glob.sync([
        path.join(__dirname, "assets/js/**/*.js"),
        path.join(__dirname, "templates/**/*.html.twig")
      ]),
      whitelistPatterns: [/slick/, /icon-/]
})

It works well but I have some selectors exceptions like that one:
.theme-slider.slick-arrow.icon-arrow-left or [class^="icon-"].slick-arrow.theme-slider or [class*=" icon-"].slick-arrow.theme-slider

By adding theme-slider is solved my problem but I want to understand the trouble to avoid to adding a maximum of selectors.

I'm working with [email protected] and symfony/[email protected].

Tks !!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant