Exclude specific files from being processed by a specific PostCSS plugin in vite.config.js file

48 Views Asked by At

I'm trying to migrate my project from Webpack to Vite. Webpack has ability test files in this way

test: /\.scss$/, <-- TEST
use: [
  {
    loader: 'postcss-loader',
    options: {
      postcssOptions: {
        plugins: [
          [
            // List of Postcss plugins....
          ],
        ],
      },
    },
  },
]

In Vite, any PostCSS plugins applied to all CSS files (include files from node_modules ) and SCSS files by default.

0

There are 0 best solutions below