Interface CSSPluginOptions

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

Properties

generateScopedName?: string | ((className, path, css) => string)

By default name is generated without hash so that it is easier and reliable for library users to override some CSS. Refer loader-utils docs for more options

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.

Default Value

undefined
keepModules?: boolean

If you want to keep .module.css files.

Default Value

undefined
skipAutoPrefixer?: boolean

set skipAutoPrefixer to true to disable autoprefixer