WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content
Discussion options

You must be logged in to vote

From what I see, there is an issue with how PurgeCSS is called. The configuration is asking to look at pages/** files but you are calling PurgeCSS with the CSS in index.js.
PurgeCSS will essentially look at index.js to determine what CSS is used, and will see in this case red1 from

const xx = await new PurgeCSS().purge({
    content: ["**/*", "pages/**/*.{js,jsx,ts,tsx}"],
    css: [
      {
        raw: ".red1 { color: red }" // This line has red1, so PurgeCSS will keep it
      }
    ]
  });

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Ffloriel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants