UNPKG

2.74 kBTypeScriptView Raw
1import webpack from 'webpack';
2import TsconfigPathsPlugin from 'tsconfig-paths-webpack-plugin';
3import { PresetOptions } from './options';
4/**
5 * Old way currently support version lower than 12.2.x
6 */
7export declare function getWebpackConfig(baseConfig: webpack.Configuration, options: PresetOptions): Promise<webpack.Configuration | {
8 entry: any[];
9 module: {
10 rules: webpack.RuleSetRule[];
11 noParse?: RegExp | RegExp[] | ((content: string) => boolean);
12 unknownContextRequest?: string;
13 unknownContextRecursive?: boolean;
14 unknownContextRegExp?: RegExp;
15 unknownContextCritical?: boolean;
16 exprContextRequest?: string;
17 exprContextRegExp?: RegExp;
18 exprContextRecursive?: boolean;
19 exprContextCritical?: boolean;
20 wrappedContextRegExp?: RegExp;
21 wrappedContextRecursive?: boolean;
22 wrappedContextCritical?: boolean;
23 strictExportPresence?: boolean;
24 };
25 plugins: webpack.Plugin[];
26 resolve: {
27 modules: string[];
28 plugins: TsconfigPathsPlugin[];
29 descriptionFiles?: string[];
30 mainFields?: string[] | string[][];
31 aliasFields?: string[] | string[][];
32 mainFiles?: string[];
33 extensions?: string[];
34 enforceExtension?: boolean;
35 alias?: {
36 [key: string]: string;
37 };
38 unsafeCache?: boolean | {};
39 cachePredicate?(data: {
40 path: string;
41 request: string;
42 }): boolean;
43 symlinks?: boolean;
44 cacheWithContext?: boolean;
45 roots?: string[];
46 };
47 resolveLoader: webpack.ResolveLoader;
48 mode?: "development" | "production" | "none";
49 name?: string;
50 context?: string;
51 devtool?: string | boolean;
52 output?: webpack.Output;
53 externals?: string | RegExp | webpack.ExternalsObjectElement | webpack.ExternalsFunctionElement | webpack.ExternalsElement[];
54 target?: "node" | "web" | "webworker" | "async-node" | "node-webkit" | "atom" | "electron" | "electron-renderer" | "electron-preload" | "electron-main" | ((compiler?: any) => void);
55 bail?: boolean;
56 profile?: boolean;
57 cache?: boolean | object;
58 watch?: boolean;
59 watchOptions?: webpack.ICompiler.WatchOptions;
60 node?: false | webpack.Node;
61 amd?: {
62 [moduleName: string]: boolean;
63 };
64 recordsPath?: string;
65 recordsInputPath?: string;
66 recordsOutputPath?: string;
67 stats?: webpack.Stats.ToStringOptions;
68 performance?: false | webpack.Options.Performance;
69 parallelism?: number;
70 optimization?: webpack.Options.Optimization;
71 infrastructureLogging?: webpack.Options.InfrastructureLogging;
72 devServer?: import("webpack-dev-server").Configuration;
73}>;
74
\No newline at end of file