#Next13 ignores postcss.config.js

2 messages · Page 1 of 1 (latest)

meager lake
#

Hi, we have a custom PostCSS config as follows with some safe list classes.
But in the dev and prod, the safe list has been completely ignored

module.exports = {
  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}',
          './components/**/*.{js,jsx,ts,tsx}',
        ],
        defaultExtractor: (content) => content.match(/[\w-/:]+(?<!:)/g) || [],
        safelist: [
          'html',
          'body',
          'live-chat-loader-placeholder',
          'bxl-youtube',
          'bxl-facebook',
          'bxl-twitter',
          'bxl-linkedin',
          'bxl-instagram',
        ],
      },
    ],
  ],
}

we also tried following to avoid any transformation

module.exports = {
  plugins: [],
}

but still our styles are not presented in bundle and dev mode

#

We are use SWC