1 | import ChainableWebpackConfig = require('webpack-chain')
|
2 | import { Configuration as WebpackOptions } from 'webpack'
|
3 |
|
4 | type PageEntry = string | string[];
|
5 |
|
6 | interface PageConfig {
|
7 | entry: PageEntry;
|
8 | [key: string]: any;
|
9 | }
|
10 |
|
11 | interface LoaderOptions {
|
12 | css?: object;
|
13 | sass?: object;
|
14 | less?: object;
|
15 | stylus?: object;
|
16 | postcss?: object;
|
17 | }
|
18 |
|
19 |
|
20 | interface ExtractOptions {
|
21 | filename?: string;
|
22 | chunkFilename?: string;
|
23 | }
|
24 |
|
25 | interface CSSOptions {
|
26 | requireModuleExtension?: boolean;
|
27 | extract?: boolean | ExtractOptions;
|
28 | sourceMap?: boolean;
|
29 | loaderOptions?: LoaderOptions;
|
30 | }
|
31 |
|
32 | interface ProjectOptions {
|
33 | publicPath?: string;
|
34 | outputDir?: string;
|
35 | assetsDir?: string;
|
36 | indexPath?: string;
|
37 | filenameHashing?: boolean;
|
38 | runtimeCompiler?: boolean;
|
39 | transpileDependencies?: Array<string | RegExp>;
|
40 | productionSourceMap?: boolean;
|
41 | parallel?: boolean | number;
|
42 | devServer?: object;
|
43 | pages?: {
|
44 | [key: string]: PageEntry | PageConfig;
|
45 | };
|
46 | crossorigin?: '' | 'anonymous' | 'use-credentials';
|
47 | integrity?: boolean;
|
48 |
|
49 | css?: CSSOptions;
|
50 |
|
51 | chainWebpack?: (config: ChainableWebpackConfig) => void;
|
52 | configureWebpack?: WebpackOptions | ((config: WebpackOptions) => (WebpackOptions | void));
|
53 |
|
54 | lintOnSave?: boolean | 'default' | 'warning' | 'error';
|
55 | pwa?: object;
|
56 |
|
57 | pluginOptions?: object;
|
58 | }
|
59 |
|
60 | type ConfigFunction = () => ProjectOptions
|
61 |
|
62 | export { ProjectOptions, ConfigFunction }
|