1 | export = MiniCssExtractPlugin;
|
2 | declare class MiniCssExtractPlugin {
|
3 | |
4 |
|
5 |
|
6 |
|
7 | static getCssModule(webpack: Compiler["webpack"]): CssModuleConstructor;
|
8 | |
9 |
|
10 |
|
11 |
|
12 | static getCssDependency(
|
13 | webpack: Compiler["webpack"]
|
14 | ): CssDependencyConstructor;
|
15 | |
16 |
|
17 |
|
18 | constructor(options?: PluginOptions | undefined);
|
19 | /**
|
20 | * @private
|
21 | * @type {WeakMap<Chunk, Set<CssModule>>}
|
22 | * @private
|
23 | */
|
24 | private _sortedModulesCache;
|
25 | |
26 |
|
27 |
|
28 |
|
29 | private options;
|
30 | |
31 |
|
32 |
|
33 |
|
34 | private runtimeOptions;
|
35 | |
36 |
|
37 |
|
38 | apply(compiler: Compiler): void;
|
39 | |
40 |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 | private getChunkModules;
|
46 | |
47 |
|
48 |
|
49 |
|
50 |
|
51 |
|
52 |
|
53 |
|
54 | private sortModules;
|
55 | |
56 |
|
57 |
|
58 |
|
59 |
|
60 |
|
61 |
|
62 |
|
63 |
|
64 |
|
65 |
|
66 | private renderContentAsset;
|
67 | }
|
68 | declare namespace MiniCssExtractPlugin {
|
69 | export {
|
70 | pluginName,
|
71 | pluginSymbol,
|
72 | loader,
|
73 | Schema,
|
74 | Compiler,
|
75 | Compilation,
|
76 | ChunkGraph,
|
77 | Chunk,
|
78 | ChunkGroup,
|
79 | Module,
|
80 | Dependency,
|
81 | Source,
|
82 | Configuration,
|
83 | WebpackError,
|
84 | AssetInfo,
|
85 | LoaderDependency,
|
86 | LoaderOptions,
|
87 | PluginOptions,
|
88 | NormalizedPluginOptions,
|
89 | RuntimeOptions,
|
90 | TODO,
|
91 | CssModule,
|
92 | CssModuleDependency,
|
93 | CssModuleConstructor,
|
94 | CssDependency,
|
95 | CssDependencyOptions,
|
96 | CssDependencyConstructor,
|
97 | };
|
98 | }
|
99 | type Compiler = import("webpack").Compiler;
|
100 | type CssModuleConstructor = new (dependency: CssModuleDependency) => CssModule;
|
101 | type CssDependencyConstructor = new (
|
102 | loaderDependency: CssDependencyOptions,
|
103 | context: string | null,
|
104 | identifierIndex: number
|
105 | ) => CssDependency;
|
106 | type PluginOptions = {
|
107 | filename?: Required<Configuration>["output"]["filename"];
|
108 | chunkFilename?: Required<Configuration>["output"]["chunkFilename"];
|
109 | ignoreOrder?: boolean | undefined;
|
110 | insert?: string | ((linkTag: HTMLLinkElement) => void) | undefined;
|
111 | attributes?: Record<string, string> | undefined;
|
112 | linkType?: string | false | undefined;
|
113 | runtime?: boolean | undefined;
|
114 | experimentalUseImportModule?: boolean | undefined;
|
115 | };
|
116 | /** @typedef {import("schema-utils/declarations/validate").Schema} Schema */
|
117 | /** @typedef {import("webpack").Compiler} Compiler */
|
118 | /** @typedef {import("webpack").Compilation} Compilation */
|
119 | /** @typedef {import("webpack").ChunkGraph} ChunkGraph */
|
120 | /** @typedef {import("webpack").Chunk} Chunk */
|
121 | /** @typedef {Parameters<import("webpack").Chunk["isInGroup"]>[0]} ChunkGroup */
|
122 | /** @typedef {import("webpack").Module} Module */
|
123 | /** @typedef {import("webpack").Dependency} Dependency */
|
124 | /** @typedef {import("webpack").sources.Source} Source */
|
125 | /** @typedef {import("webpack").Configuration} Configuration */
|
126 | /** @typedef {import("webpack").WebpackError} WebpackError */
|
127 | /** @typedef {import("webpack").AssetInfo} AssetInfo */
|
128 | /** @typedef {import("./loader.js").Dependency} LoaderDependency */
|
129 | /**
|
130 | * @typedef {Object} LoaderOptions
|
131 | * @property {string | ((resourcePath: string, rootContext: string) => string)} [publicPath]
|
132 | * @property {boolean} [emit]
|
133 | * @property {boolean} [esModule]
|
134 | * @property {string} [layer]
|
135 | */
|
136 | /**
|
137 | * @typedef {Object} PluginOptions
|
138 | * @property {Required<Configuration>['output']['filename']} [filename]
|
139 | * @property {Required<Configuration>['output']['chunkFilename']} [chunkFilename]
|
140 | * @property {boolean} [ignoreOrder]
|
141 | * @property {string | ((linkTag: HTMLLinkElement) => void)} [insert]
|
142 | * @property {Record<string, string>} [attributes]
|
143 | * @property {string | false | 'text/css'} [linkType]
|
144 | * @property {boolean} [runtime]
|
145 | * @property {boolean} [experimentalUseImportModule]
|
146 | */
|
147 | /**
|
148 | * @typedef {Object} NormalizedPluginOptions
|
149 | * @property {Required<Configuration>['output']['filename']} filename
|
150 | * @property {Required<Configuration>['output']['chunkFilename']} [chunkFilename]
|
151 | * @property {boolean} ignoreOrder
|
152 | * @property {string | ((linkTag: HTMLLinkElement) => void)} [insert]
|
153 | * @property {Record<string, string>} [attributes]
|
154 | * @property {string | false | 'text/css'} [linkType]
|
155 | * @property {boolean} runtime
|
156 | * @property {boolean} [experimentalUseImportModule]
|
157 | */
|
158 | /**
|
159 | * @typedef {Object} RuntimeOptions
|
160 | * @property {string | ((linkTag: HTMLLinkElement) => void) | undefined} insert
|
161 | * @property {string | false | 'text/css'} linkType
|
162 | * @property {Record<string, string> | undefined} attributes
|
163 | */
|
164 | /** @typedef {any} TODO */
|
165 | declare const pluginName: "mini-css-extract-plugin";
|
166 | declare const pluginSymbol: unique symbol;
|
167 | declare var loader: string;
|
168 | type Schema = import("schema-utils/declarations/validate").Schema;
|
169 | type Compilation = import("webpack").Compilation;
|
170 | type ChunkGraph = import("webpack").ChunkGraph;
|
171 | type Chunk = import("webpack").Chunk;
|
172 | type ChunkGroup = Parameters<import("webpack").Chunk["isInGroup"]>[0];
|
173 | type Module = import("webpack").Module;
|
174 | type Dependency = import("webpack").Dependency;
|
175 | type Source = import("webpack").sources.Source;
|
176 | type Configuration = import("webpack").Configuration;
|
177 | type WebpackError = import("webpack").WebpackError;
|
178 | type AssetInfo = import("webpack").AssetInfo;
|
179 | type LoaderDependency = import("./loader.js").Dependency;
|
180 | type LoaderOptions = {
|
181 | publicPath?:
|
182 | | string
|
183 | | ((resourcePath: string, rootContext: string) => string)
|
184 | | undefined;
|
185 | emit?: boolean | undefined;
|
186 | esModule?: boolean | undefined;
|
187 | layer?: string | undefined;
|
188 | };
|
189 | type NormalizedPluginOptions = {
|
190 | filename: Required<Configuration>["output"]["filename"];
|
191 | chunkFilename?: Required<Configuration>["output"]["chunkFilename"];
|
192 | ignoreOrder: boolean;
|
193 | insert?: string | ((linkTag: HTMLLinkElement) => void) | undefined;
|
194 | attributes?: Record<string, string> | undefined;
|
195 | linkType?: string | false | undefined;
|
196 | runtime: boolean;
|
197 | experimentalUseImportModule?: boolean | undefined;
|
198 | };
|
199 | type RuntimeOptions = {
|
200 | insert: string | ((linkTag: HTMLLinkElement) => void) | undefined;
|
201 | linkType: string | false | "text/css";
|
202 | attributes: Record<string, string> | undefined;
|
203 | };
|
204 | type TODO = any;
|
205 | type CssModule = import("webpack").Module & {
|
206 | content: Buffer;
|
207 | media?: string | undefined;
|
208 | sourceMap?: Buffer | undefined;
|
209 | supports?: string | undefined;
|
210 | layer?: string | undefined;
|
211 | assets?:
|
212 | | {
|
213 | [key: string]: any;
|
214 | }
|
215 | | undefined;
|
216 | assetsInfo?: Map<string, import("webpack").AssetInfo> | undefined;
|
217 | };
|
218 | type CssModuleDependency = {
|
219 | context: string | null;
|
220 | identifier: string;
|
221 | identifierIndex: number;
|
222 | content: Buffer;
|
223 | sourceMap?: Buffer | undefined;
|
224 | media?: string | undefined;
|
225 | supports?: string | undefined;
|
226 | layer?: TODO;
|
227 | assetsInfo?: Map<string, import("webpack").AssetInfo> | undefined;
|
228 | assets?:
|
229 | | {
|
230 | [key: string]: any;
|
231 | }
|
232 | | undefined;
|
233 | };
|
234 | type CssDependency = Dependency & CssModuleDependency;
|
235 | type CssDependencyOptions = Omit<LoaderDependency, "context">;
|
236 |
|
\ | No newline at end of file |