Skip to content

pantoken-root / bundlers/postcss/src / pantoken

Biến: pantoken ​

const pantoken: {(options?): Plugin; postcss: true; }

Thử nghiệm

Plugin PostCSS của pantoken.

Type Declaration ​

Tham số ​

options? ​

PantokenPostcssOptions

PantokenPostcssOptions.

Trả về ​

Plugin

Một Plugin cho PostCSS.

postcss ​

postcss: true

Ký hiệu bắt buộc của plugin PostCSS.

Các ví dụ ​

Đăng ký plugin trong postcss.config.js

js
import pantoken from "@pantoken/postcss";

export default { plugins: [pantoken()] };
// In your entry stylesheet, `@pantoken;` expands to the token stylesheet.

Mở rộng một at-rule tùy chỉnh (atRule: "instui" thay vì mặc định)

js
import { pantoken } from "@pantoken/postcss";

export default { plugins: [pantoken({ atRule: "instui" })] };