why css class is not included in bundle css?

Viewed 58

I am using postcss-purgecss plugin to remove unused css file.I am facing one issue my one class is not preserve in bundle why ?

here is my configuration file

{
  "plugins": [
    "postcss-flexbugs-fixes",
    [
      "postcss-preset-env",
      {
        "autoprefixer": {
          "flexbox": "no-2009"
        },
        "stage": 3,
        "features": {
          "custom-properties": false
        }
      }
    ],
    [
      "@fullhuman/postcss-purgecss",
      {
        "content": [
          "./pages/**/*.{js,jsx,ts,tsx}",
          "./src/pages/**/*.{js,jsx,ts,tsx}",
          "./components/**/*.{js,jsx,ts,tsx}",
          "./src/components/**/*.{js,jsx,ts,tsx}",
          "./src/core/components/**/*.{js,jsx,ts,tsx}"
        ],
        "safelist": [
         "body",
         "html",
         ".f20 [class^='icn-']:before,.f20 [class*=' icn-']"
        ]
      }
    ]
  ]
}

why this class is not preserved ".f20 [class^='icn-']:before,.f20 [class*=' icn-']" it should be present in bundle.

Steps to follow to check build

  1. Close the terminal and run npm run build.
  2. It create .next folder inside this there is static folder inside there is css folder where you check the output

https://repl.it/@naveennsit/HorribleNumbAtom

enter image description here

any update ?

0 Answers
Related