forked from faceyspacey/webpack-flush-chunks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
54 lines (41 loc) · 1.21 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
declare module 'webpack-flush-chunks' {
import { Stats } from 'webpack';
export default function flushChunks(
stats: Stats,
options: {
chunkNames: string[];
before?: string[];
after?: string[];
/**
* Required only if you want to serve raw CSS.
*
*/
outputPath?: string;
},
): {
/** JavaScript chunks as a React component */
Js: React.Component<{}>;
/** External Stylesheets as a React component */
Styles: React.Component<{}>;
/** Raw CSS as a React component */
Css: React.Component<{}>;
/** JavaScript chunks */
js: string[];
/** External stylesheets */
styles: string[];
/** raw CSS */
css: string[];
/** Array of filenames */
scripts: string[];
/** Array of filenames */
stylesheets: string[];
/** Hash object of chunk names to CSS file paths */
cssHashRaw: Record<string, string>;
/** `<script>window.__CSS_CHUNKS__ = ${JSON.stringify(cssHashRaw)}</script>` */
cssHash: string[];
/** `<script>window.__CSS_CHUNKS__ = ${JSON.stringify(cssHashRaw)}</script>` as a React component */
CssHash: React.Component<{}>;
publicPath: string;
outputPath: string;
};
}