Get started
Installation
pnpm add -D @postcss-go/core postcssnpm install --save-dev @postcss-go/core postcssyarn add --dev @postcss-go/core postcssbun add --dev @postcss-go/core postcssdeno add --dev npm:@postcss-go/core npm:postcssThe 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.cssFor a gradual migration, keep your existing postcss.config.js and replace
the postcss CLI invocation with postcss-go.