UNPKG

1.91 kBTypeScriptView Raw
1export type Compilation = import("webpack").Compilation;
2export type Module = import("webpack").Module;
3export type LoaderContext = import("webpack").LoaderContext<any>;
4/** @typedef {import("webpack").Compilation} Compilation */
5/** @typedef {import("webpack").Module} Module */
6/** @typedef {import("webpack").LoaderContext<any>} LoaderContext */
7/**
8 * @returns {boolean}
9 */
10export function trueFn(): boolean;
11/**
12 * @param {Compilation} compilation
13 * @param {string | number} id
14 * @returns {null | Module}
15 */
16export function findModuleById(
17 compilation: Compilation,
18 id: string | number
19): null | Module;
20/**
21 * @param {LoaderContext} loaderContext
22 * @param {string | Buffer} code
23 * @param {string} filename
24 * @returns {object}
25 */
26export function evalModuleCode(
27 loaderContext: LoaderContext,
28 code: string | Buffer,
29 filename: string
30): object;
31/**
32 * @param {Module} a
33 * @param {Module} b
34 * @returns {0 | 1 | -1}
35 */
36export function compareModulesByIdentifier(a: Module, b: Module): 0 | 1 | -1;
37export const MODULE_TYPE: "css/mini-extract";
38export const AUTO_PUBLIC_PATH: "__mini_css_extract_plugin_public_path_auto__";
39export const ABSOLUTE_PUBLIC_PATH: "webpack:///mini-css-extract-plugin/";
40export const BASE_URI: "webpack://";
41export const SINGLE_DOT_PATH_SEGMENT: "__mini_css_extract_plugin_single_dot_path_segment__";
42/**
43 * @param {LoaderContext} loaderContext
44 * @param {string} request
45 * @returns {string}
46 */
47export function stringifyRequest(
48 loaderContext: LoaderContext,
49 request: string
50): string;
51/**
52 *
53 * @param {string | function} value
54 * @returns {string}
55 */
56export function stringifyLocal(value: string | Function): string;
57/**
58 * @param {string} filename
59 * @param {string} outputPath
60 * @param {boolean} enforceRelative
61 * @returns {string}
62 */
63export function getUndoPath(
64 filename: string,
65 outputPath: string,
66 enforceRelative: boolean
67): string;