Skip to content

pantoken / bundlers/webpack/src / PantokenWebpackPlugin

Klass: PantokenWebpackPlugin

Experimentell

Webpack-plugin som genererar pantoken-stilarket som en utdataresurs.

Exempel

Generera pantoken.css från din webpack.config.js

js
import { PantokenWebpackPlugin } from "@pantoken/webpack";

export default {
  plugins: [new PantokenWebpackPlugin()],
};

Byt namn på den genererade resursen

js
import { PantokenWebpackPlugin } from "@pantoken/webpack";

export default {
  plugins: [new PantokenWebpackPlugin({ filename: "tokens.css" })],
};

Konstruktorer

Konstruktor

new PantokenWebpackPlugin(options?): PantokenWebpackPlugin

Experimentell

Parametrar

options?

PantokenWebpackOptions = {}

Returnerar

PantokenWebpackPlugin

Metoder

apply()

apply(compiler): void

Experimentell

Parametrar

compiler

CompilerLike

Returnerar

void