Get started
Installation
pnpm add -D @postcss-go/corenpm install --save-dev @postcss-go/coreyarn add --dev @postcss-go/corebun add --dev @postcss-go/coredeno add --dev npm:@postcss-go/coreThe 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.cssFor a gradual migration, see the migration and compatibility guide.
For browsers, import @postcss-go/core/wasm and follow the
Browser and WASM guide.