Get started

Installation

pnpm add -D @postcss-go/core

The package requires Node.js 18 or newer and installs a matching optional native platform package. It does not require postcss at runtime.

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, see the migration and compatibility guide. For browsers, import @postcss-go/core/wasm and follow the Browser and WASM guide.