UNPKG

1.53 kBPlain TextView Raw
1/**
2 * ezpack的接口定义文件
3 * 也是doc.html的生成源
4 */
5import { WebpackOptions } from "./webpack/interface";
6import { DevServerOption } from "./devServer";
7
8export interface PublishOptions {
9 /**
10 * 线上静态文件的仓库(比如 ezstatic)路径
11 */
12 onlinePath: string;
13 /**
14 * uat 静态文件的仓库(比如 localezstatic)路径
15 */
16 uatPath: string;
17 /**
18 * uat 对应的多套环境的名称,对应多个静态目录,比如 dgamin.65emall.net,dgadmin2.65emall.net
19 */
20 uatEnv: string[];
21 /**
22 * uat 对应的多个 map 文件的名称,比如 aspirin 项目的 env1-map.js,env2-map.js
23 */
24 uatMapName: string[];
25 /**
26 * 保存上面多个 map 文件的目录名称
27 */
28 mapDir: string;
29}
30
31export type ExtendWebpackConfig = ({ options: WebpackOptions }) => Promise<WebpackOptions>;
32
33export interface EZPackOptions {
34 /** 项目名称 */
35 name: string;
36 /**
37 * webpack 相关配置
38 */
39 webpack: WebpackOptions;
40 /**
41 * 开发服务器配置
42 */
43 devServer: DevServerOption;
44 /**
45 * 发布相关配置
46 */
47 publish: PublishOptions;
48 /**
49 * 禁用start/ build 模式下的entry选择,默认使用All entry
50 */
51 disableEntrySelect?: boolean;
52
53 /**
54 * sentry 相关配置
55 */
56 sentry?: {
57 /**
58 * 项目在 sentry 上面的名称
59 */
60 projectName: string;
61 /**
62 * sentry 的域名,用于上传 map 文件
63 */
64 host: {
65 online: string;
66 uat: string;
67 };
68 token: {
69 online: string;
70 uat: string;
71 };
72 };
73
74 extendWebpackConfig?: ExtendWebpackConfig;
75}