Skip to content

How to integrate pandacss + nexts + purgecss? #1498

Closed Answered by anubra266
well1791 asked this question in Q&A
Discussion options

You must be logged in to vote

Array Syntax:

In this approach, you list the plugin names as strings in an array within your PostCSS configuration file (postcss.config.js). You can use this syntax if you don't need to configure individual plugin options.

// postcss.config.js

module.exports = {
  plugins: [
    require('@pandacss/dev/postcss'),
    [
      '@fullhuman/postcss-purgecss',
      process.env.NODE_ENV === 'production'
        ? {
            // Specify the paths to all of the template files
            content: ['./app/**/*.tsx'],
            sources: ['./app/**/*.css'],
            variables: true,
          }
        : undefined,
    ],
  ],
};

Object Syntax:

In this approach, you define each plugin as an …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by well1791
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