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