mini-css-extract-plugin

  • Version 2.9.4
  • Published
  • 140 kB
  • 2 dependencies
  • MIT license

Install

npm i mini-css-extract-plugin
yarn add mini-css-extract-plugin
pnpm add mini-css-extract-plugin

Overview

extracts CSS into separate files

Index

Variables

variable loader

var loader: string;

    variable loader

    var loader: string;

      variable pluginName

      const pluginName: string;
      • {object} RuntimeOptions {string | ((linkTag: HTMLLinkElement) => void)=} insert a link insert place or a custom insert function {string | false | 'text/css'} linkType value of a link type attribute {Record<string, string>=} attributes link attributes

      variable pluginName

      const pluginName: string;
      • {object} RuntimeOptions {string | ((linkTag: HTMLLinkElement) => void)=} insert a link insert place or a custom insert function {string | false | 'text/css'} linkType value of a link type attribute {Record<string, string>=} attributes link attributes

      variable pluginSymbol

      const pluginSymbol: Symbol;

        variable pluginSymbol

        const pluginSymbol: Symbol;

          Classes

          class MiniCssExtractPlugin

          class MiniCssExtractPlugin {}

            constructor

            constructor(options?: PluginOptions);
            • Parameter options

              options

            method apply

            apply: (compiler: any) => void;
            • Parameter compiler

              compiler

            method getCompilationHooks

            static getCompilationHooks: (
            compilation: any
            ) => MiniCssExtractPluginCompilationHooks;
            • Returns all hooks for the given compilation

              Parameter compilation

              the compilation

              Returns

              {MiniCssExtractPluginCompilationHooks} hooks

            method getCssDependency

            static getCssDependency: (webpack: any) => CssDependencyConstructor;
            • Parameter webpack

              webpack

              Returns

              {CssDependencyConstructor} CSS dependency constructor

            method getCssModule

            static getCssModule: (webpack: any) => CssModuleConstructor;
            • Parameter webpack

              webpack

              Returns

              {CssModuleConstructor} CSS module constructor

            Type Aliases

            type AssetInfo

            type AssetInfo = import('webpack').AssetInfo;

              type Chunk

              type Chunk = import('webpack').Chunk;

                type ChunkFilename

                type ChunkFilename = NonNullable<Required<Configuration>['output']['chunkFilename']>;

                  type ChunkGraph

                  type ChunkGraph = import('webpack').ChunkGraph;

                    type ChunkGroup

                    type ChunkGroup = import('webpack').ChunkGroup;

                      type Compilation

                      type Compilation = import('webpack').Compilation;

                        type Compiler

                        type Compiler = import('webpack').Compiler;

                          type Configuration

                          type Configuration = import('webpack').Configuration;

                            type CssDependency

                            type CssDependency = Dependency & CssModuleDependency;

                              type CssDependencyConstructor

                              type CssDependencyConstructor = {
                              new (
                              loaderDependency: CssDependencyOptions,
                              context: string | null,
                              identifierIndex: number
                              ): CssDependency;
                              };

                                type CssDependencyOptions

                                type CssDependencyOptions = Omit<LoaderDependency, 'context'>;

                                  type CssModule

                                  type CssModule = Module & {
                                  content: Buffer;
                                  media?: string;
                                  sourceMap?: Buffer;
                                  supports?: string;
                                  layer?: string;
                                  assets?: {
                                  [key: string]: Source;
                                  };
                                  assetsInfo?: Map<string, AssetInfo>;
                                  };

                                    type CssModuleConstructor

                                    type CssModuleConstructor = {
                                    new (dependency: CssModuleDependency): CssModule;
                                    };

                                      type CssModuleDependency

                                      type CssModuleDependency = {
                                      context: string | null;
                                      identifier: string;
                                      identifierIndex: number;
                                      content: Buffer;
                                      sourceMap?: Buffer;
                                      media?: string;
                                      supports?: string;
                                      layer?: any;
                                      assetsInfo?: Map<string, AssetInfo>;
                                      assets?: {
                                      [key: string]: Source;
                                      };
                                      };

                                        type Dependency

                                        type Dependency = import('webpack').Dependency;

                                          type Filename

                                          type Filename = NonNullable<Required<Configuration>['output']['filename']>;

                                            type LoaderDependency

                                            type LoaderDependency = import('./loader.js').Dependency;

                                              type LoaderOptions

                                              type LoaderOptions = {
                                              /**
                                              * public path
                                              */
                                              publicPath?:
                                              | (string | ((resourcePath: string, rootContext: string) => string))
                                              | undefined;
                                              /**
                                              * true when need to emit, otherwise false
                                              */
                                              emit?: boolean | undefined;
                                              /**
                                              * need to generate ES module syntax
                                              */
                                              esModule?: boolean | undefined;
                                              /**
                                              * a layer
                                              */
                                              layer?: string | undefined;
                                              /**
                                              * true when need to use default export, otherwise false
                                              */
                                              defaultExport?: boolean | undefined;
                                              };

                                                type MiniCssExtractPluginCompilationHooks

                                                type MiniCssExtractPluginCompilationHooks = {
                                                /**
                                                * before tag insert hook
                                                */
                                                beforeTagInsert: import('tapable').SyncWaterfallHook<[string, VarNames], string>;
                                                /**
                                                * link preload hook
                                                */
                                                linkPreload: SyncWaterfallHook<[string, Chunk]>;
                                                /**
                                                * link prefetch hook
                                                */
                                                linkPrefetch: SyncWaterfallHook<[string, Chunk]>;
                                                };

                                                  type Module

                                                  type Module = import('webpack').Module;

                                                    type NormalizedPluginOptions

                                                    type NormalizedPluginOptions = {
                                                    /**
                                                    * filename
                                                    */
                                                    filename: Filename;
                                                    /**
                                                    * chunk filename
                                                    */
                                                    chunkFilename?: ChunkFilename | undefined;
                                                    /**
                                                    * true when need to ignore order, otherwise false
                                                    */
                                                    ignoreOrder: boolean;
                                                    /**
                                                    * a link insert place or a custom insert function
                                                    */
                                                    insert?: (string | ((linkTag: HTMLLinkElement) => void)) | undefined;
                                                    /**
                                                    * link attributes
                                                    */
                                                    attributes?: Record<string, string> | undefined;
                                                    /**
                                                    * value of a link type attribute
                                                    */
                                                    linkType?: (string | false | 'text/css') | undefined;
                                                    /**
                                                    * true when need to generate runtime code, otherwise false
                                                    */
                                                    runtime: boolean;
                                                    /**
                                                    * true when need to use `experimentalUseImportModule` API, otherwise false
                                                    */
                                                    experimentalUseImportModule?: boolean | undefined;
                                                    };

                                                      type PluginOptions

                                                      type PluginOptions = {
                                                      /**
                                                      * filename
                                                      */
                                                      filename?: Filename | undefined;
                                                      /**
                                                      * chunk filename
                                                      */
                                                      chunkFilename?: ChunkFilename | undefined;
                                                      /**
                                                      * true when need to ignore order, otherwise false
                                                      */
                                                      ignoreOrder?: boolean | undefined;
                                                      /**
                                                      * link insert place or a custom insert function
                                                      */
                                                      insert?: (string | ((linkTag: HTMLLinkElement) => void)) | undefined;
                                                      /**
                                                      * link attributes
                                                      */
                                                      attributes?: Record<string, string> | undefined;
                                                      /**
                                                      * value of a link type attribute
                                                      */
                                                      linkType?: (string | false | 'text/css') | undefined;
                                                      /**
                                                      * true when need to generate runtime code, otherwise false
                                                      */
                                                      runtime?: boolean | undefined;
                                                      /**
                                                      * true when need to use `experimentalUseImportModule` API, otherwise false
                                                      */
                                                      experimentalUseImportModule?: boolean | undefined;
                                                      };

                                                        type RuntimeOptions

                                                        type RuntimeOptions = {
                                                        /**
                                                        * a link insert place or a custom insert function
                                                        */
                                                        insert?: (string | ((linkTag: HTMLLinkElement) => void)) | undefined;
                                                        /**
                                                        * value of a link type attribute
                                                        */
                                                        linkType: string | false | 'text/css';
                                                        /**
                                                        * link attributes
                                                        */
                                                        attributes?: Record<string, string> | undefined;
                                                        };

                                                          type Schema

                                                          type Schema = import('schema-utils/declarations/validate').Schema;

                                                            type Source

                                                            type Source = import('webpack').sources.Source;

                                                              type VarNames

                                                              type VarNames = {
                                                              /**
                                                              * tag
                                                              */
                                                              tag: string;
                                                              /**
                                                              * chunk id
                                                              */
                                                              chunkId: string;
                                                              /**
                                                              * href
                                                              */
                                                              href: string;
                                                              /**
                                                              * resolve
                                                              */
                                                              resolve: string;
                                                              /**
                                                              * reject
                                                              */
                                                              reject: string;
                                                              };

                                                                type WebpackError

                                                                type WebpackError = import('webpack').WebpackError;

                                                                  Package Files (1)

                                                                  Dependencies (2)

                                                                  Dev Dependencies (44)

                                                                  Peer Dependencies (1)

                                                                  Badge

                                                                  To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                  You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/mini-css-extract-plugin.

                                                                  • Markdown
                                                                    [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/mini-css-extract-plugin)
                                                                  • HTML
                                                                    <a href="https://www.jsdocs.io/package/mini-css-extract-plugin"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>