UNPKG

2.46 kBTypeScriptView Raw
1export interface DllPackageConfig {
2 name: string;
3 path: string;
4}
5export interface DllBundleConfig {
6 name: string;
7 packages: Array<string | DllPackageConfig>;
8}
9export interface DllBundlesPluginOptions {
10 bundles: {
11 [key: string]: Array<string | DllPackageConfig>;
12 };
13 /**
14 * Webpack configuration object.
15 * Can be a path, an config object or a config object factory
16 *
17 * If the path (string) is relative, resolved using the context option.
18 */
19 webpackConfig: string | any;
20 /**
21 * The directory to store bundles and metadata it.
22 *
23 * If not absolute context is process.cwd()
24 */
25 dllDir: string;
26 /**
27 * If true will ignore any errors resulted from package resolution.
28 * Such errors can be name mismatch, packages not found, package.json not found etc...
29 *
30 * Error resolution errors does not mean a bundle can not build, if the package exists it will build.
31 * These errors mean that there was no exact match so the build state is not known and as a result
32 * the next check will result in a rebuild. If a package error is not fixed it essentially means that
33 * the bundle will build every time, no caching.
34 *
35 * When using node modules as packages in the bundle this should be left FALSE.
36 * When using a path to a file/directory that is part of the project or does not have package.json file next to it then
37 * you should set this value to TRUE. (read comment below)
38 *
39 * > Having files within the project as packages inside a DLL bundle is possible but not recommended.
40 * It is difficult to detect changes in the tree created by the file so `DllBundlesPlugin` will ignore it
41 * making it appear as "changed" for every check for updates in the bundle hence re-building the DLL bundle every time.
42 * Using the plugin with such behaviour makes no sense, make sure to add a "package.json" file next
43 * to the file you reference as well as update it's version on every change.
44 *
45 * > While setting ignorePackageError to TRUE will not throw if a package was not found Webpack will.
46 *
47 * @default false
48 */
49 ignorePackageError?: boolean;
50 /**
51 * The context for the plugin.
52 *
53 * Used as context for internal plugins, e.g: DllReferencePlugin
54 * Used as context for dllDir (if relative)
55 *
56 * @default process.cwd()
57 */
58 context?: string;
59}