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