Get started

Installation

pnpm add -D @postcss-go/core postcss

The package requires Node.js 18 or newer. The CLI launches the Go engine and keeps plugin configuration in the familiar PostCSS format.

Configuration

Create postcss.config.js, .cjs, or .mjs at the project root:

postcss.config.js
export default {
  plugins: {
    autoprefixer: {},
  },
};

You can also use a function configuration when options depend on the current file or environment:

postcss.config.js
export default (ctx) => ({
  map: ctx.env === 'production',
  plugins: {
    autoprefixer: {},
  },
});

First command

terminal
pnpm postcss-go src/index.css -o dist/index.css

For a gradual migration, keep your existing postcss.config.js and replace the postcss CLI invocation with postcss-go.