Skip to content

pantoken-root / bundlers/webpack/src / PantokenWebpackPlugin

Klasse: PantokenWebpackPlugin ​

Experimentell

Webpack-Plugin, das das pantoken-Stylesheet als Ausgabedatei (Asset) erzeugt.

Beispiele ​

pantoken.css aus Ihrer webpack.config.js ausgeben

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

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

Benennen Sie das erzeugte Asset um

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

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

Konstruktoren ​

Konstruktor ​

new PantokenWebpackPlugin(options?): PantokenWebpackPlugin

Experimentell

Parameter ​

options? ​

PantokenWebpackOptions = {}

Rückgabe ​

PantokenWebpackPlugin

Methoden ​

apply() ​

apply(compiler): void

Experimentell

Parameter ​

compiler ​

CompilerLike

Rückgabe ​

void