@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.
@@ -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;
@@ -0,0 +1,3 @@
1
+ declare function extractPackageName(modulePath: string): any;
2
+ declare const _default: typeof extractPackageName;
3
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import type webpack from 'webpack';
2
+ export declare class PageKitCodeSplittingPlugin {
3
+ apply(compiler: webpack.Compiler): void;
4
+ }