next.js/test/e2e/postcss-config-ts/postcss-config-cts/plugin.cjs
plugin.cjs20 lines405 B
// Custom PostCSS plugin that transforms color: red to color: green
// This allows us to verify that the PostCSS config is actually being applied

const plugin = () => {
  return {
    postcssPlugin: 'color-transform',
    Declaration: {
      color(decl) {
        if (decl.value === 'red') {
          decl.value = 'green'
        }
      },
    },
  }
}

plugin.postcss = true

module.exports = plugin
Quest for Codev2.0.0
/
SIGN IN