diff --git a/docs/functions/cssPlugin.html b/docs/functions/cssPlugin.html index 4d4f89c..7809e3a 100644 --- a/docs/functions/cssPlugin.html +++ b/docs/functions/cssPlugin.html @@ -1,3 +1,3 @@ cssPlugin | Code Documentation

Function cssPlugin

  • Parameters

    Returns Plugin

    Source

    const cssPlugin: (options?: CSSPluginOptions) => Plugin = (options = {}) => ({
    name: "esbuild-plugin-react18-css-" + uuid(),
    setup(build): void {
    const write = build.initialOptions.write;
    build.initialOptions.write = false;
    if (!options.generateScopedName) resolveScopedName(options);
    handleModules(build, options);
    handleScss(build);
    applyAutoPrefixer(build, options, write);
    },
    });
    -
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/interfaces/CSSPluginOptions.html b/docs/interfaces/CSSPluginOptions.html index 93f0fe9..1edb6d7 100644 --- a/docs/interfaces/CSSPluginOptions.html +++ b/docs/interfaces/CSSPluginOptions.html @@ -1,4 +1,4 @@ -CSSPluginOptions | Code Documentation

Interface CSSPluginOptions

interface CSSPluginOptions {
    generateScopedName?: string | ((className, path, css) => string);
    globalPrefix?: string;
    keepModules?: boolean;
    skipAutoPrefixer?: boolean;
}

Properties

generateScopedName? +CSSPluginOptions | Code Documentation

Interface CSSPluginOptions

interface CSSPluginOptions {
    generateScopedName?: string | ((className, path, css) => string);
    globalPrefix?: string;
    keepModules?: boolean;
    skipAutoPrefixer?: boolean;
}

Properties

Type declaration

    • (className, path, css): string
    • Parameters

      • className: string
      • path: string
      • css: string

      Returns string

Default Value

A function that generates name similar to [name]__[local] but without .module
 
-
globalPrefix?: string

global CSS class prefix.

+
globalPrefix?: string

global CSS class prefix.

Default Value

undefined
 
-
keepModules?: boolean

If you want to keep .module.css files.

+
keepModules?: boolean

If you want to keep .module.css files.

Default Value

undefined
 
-
skipAutoPrefixer?: boolean

set skipAutoPrefixer to true to disable autoprefixer

-
\ No newline at end of file +
skipAutoPrefixer?: boolean

set skipAutoPrefixer to true to disable autoprefixer

+
\ No newline at end of file