next.js/test/e2e/postcss-config-ts/postcss-config-mts/plugin.mjs
plugin.mjs20 lines403 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

export default plugin
Quest for Codev2.0.0
/
SIGN IN