@financial-times/dotcom-build-code-splitting 7.3.0 → 7.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/node/bundleTypes.d.ts +78 -0
- package/dist/node/createSafeChunkName.d.ts +1 -0
- package/dist/node/extractPackageName.d.ts +3 -0
- package/dist/node/index.d.ts +4 -0
- package/dist/tsconfig.tsbuildinfo +3091 -0
- package/package.json +6 -4
- package/src/bundleTypes.ts +0 -168
- package/src/createSafeChunkName.ts +0 -4
- package/src/extractPackageName.ts +0 -12
- package/src/index.ts +0 -109
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import type webpack from 'webpack';
|
|
2
|
+
interface IBundleWithPackageNames {
|
|
3
|
+
compiler: webpack.Compiler;
|
|
4
|
+
name: string;
|
|
5
|
+
packages: string[];
|
|
6
|
+
usedInUnknownWay?: boolean;
|
|
7
|
+
}
|
|
8
|
+
interface IBundleWithRegExp {
|
|
9
|
+
compiler: webpack.Compiler;
|
|
10
|
+
name: string;
|
|
11
|
+
pattern: RegExp;
|
|
12
|
+
usedInUnknownWay?: boolean;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Create a chunk which includes all packages in the given list of names
|
|
16
|
+
*/
|
|
17
|
+
export declare function createBundleWithPackages({ compiler, name, packages, usedInUnknownWay }: IBundleWithPackageNames): {
|
|
18
|
+
optimization: {
|
|
19
|
+
splitChunks: {
|
|
20
|
+
cacheGroups: {
|
|
21
|
+
[x: string]: {
|
|
22
|
+
name: string;
|
|
23
|
+
test: (module: any) => boolean;
|
|
24
|
+
enforce: boolean;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Create a chunk which includes all modules which match the given pattern
|
|
32
|
+
*/
|
|
33
|
+
export declare function createBundleWithRegExp({ compiler, name, pattern, usedInUnknownWay }: IBundleWithRegExp): {
|
|
34
|
+
optimization: {
|
|
35
|
+
splitChunks: {
|
|
36
|
+
cacheGroups: {
|
|
37
|
+
[x: string]: {
|
|
38
|
+
name: string;
|
|
39
|
+
test: (module: any) => boolean;
|
|
40
|
+
enforce: boolean;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Create a chunk for each package in the given list of names
|
|
48
|
+
*/
|
|
49
|
+
export declare function createBundlesForPackages({ compiler, name, packages, usedInUnknownWay }: IBundleWithPackageNames): {
|
|
50
|
+
optimization: {
|
|
51
|
+
splitChunks: {
|
|
52
|
+
cacheGroups: {
|
|
53
|
+
[x: string]: {
|
|
54
|
+
name(module: any): string;
|
|
55
|
+
test(module: any): boolean;
|
|
56
|
+
enforce: boolean;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Create a chunk for each group of modules which match the given pattern
|
|
64
|
+
*/
|
|
65
|
+
export declare function createBundlesForRegExp({ compiler, name, pattern, usedInUnknownWay }: IBundleWithRegExp): {
|
|
66
|
+
optimization: {
|
|
67
|
+
splitChunks: {
|
|
68
|
+
cacheGroups: {
|
|
69
|
+
[x: string]: {
|
|
70
|
+
name(module: any): string;
|
|
71
|
+
test(module: any): boolean;
|
|
72
|
+
enforce: boolean;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function createSafeChunkName(name: string): string;
|