@tarojs/taro 3.6.8 → 3.6.9-alpha.10

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.
@@ -68,6 +68,31 @@ declare module '../../index' {
68
68
  }
69
69
  }
70
70
 
71
+ namespace getChannelsShareKey {
72
+ interface Option {
73
+ /** 接口调用结束的回调函数(调用成功、失败都会执行) */
74
+ complete?: (res: TaroGeneral.CallbackResult) => void
75
+ /** 接口调用失败的回调函数 */
76
+ fail?: (res: TaroGeneral.CallbackResult) => void
77
+ /** 接口调用成功的回调函数 */
78
+ success?: (result: SuccessCallbackResult) => void
79
+ }
80
+ interface SuccessCallbackResult extends TaroGeneral.CallbackResult {
81
+ /** 分享者 openid */
82
+ sharerOpenId: string
83
+ /** 推广员 */
84
+ promoter: Promoter
85
+ }
86
+ interface Promoter {
87
+ /** 推广员昵称 */
88
+ finderNickname: string
89
+ /** 推广员id */
90
+ promoterId: string
91
+ /** 推广员openid */
92
+ promoterOpenId: string
93
+ }
94
+ }
95
+
71
96
  namespace getChannelsLiveNoticeInfo {
72
97
  interface Option {
73
98
  /** 视频号 id,以“sph”开头的id,可在视频号助手获取 */
@@ -164,6 +189,12 @@ declare module '../../index' {
164
189
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/open-api/channels/wx.openChannelsActivity.html
165
190
  */
166
191
  openChannelsActivity(option?: openChannelsActivity.Option): Promise<TaroGeneral.CallbackResult>
192
+ /** 获取视频号直播卡片/视频卡片的分享来源,
193
+ * 仅当卡片携带了分享信息、同时用户已授权该小程序获取视频号分享信息且启动场景值为 1177、1184、1195、1208 时可用
194
+ * @supported weapp
195
+ * @see https://developers.weixin.qq.com/miniprogram/dev/api/open-api/channels/wx.getChannelsShareKey.html
196
+ */
197
+ getChannelsShareKey(option?: getChannelsShareKey.Option): Promise<getChannelsShareKey.SuccessCallbackResult>
167
198
  /** 获取视频号直播预告信息
168
199
  * @supported weapp
169
200
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/open-api/channels/wx.getChannelsLiveNoticeInfo.html
@@ -0,0 +1,63 @@
1
+ import Taro from '../../index'
2
+
3
+ declare module '../../index' {
4
+ namespace requestDeviceVoIP {
5
+ interface Option {
6
+ /** 设备唯一序列号。由厂商分配,长度不能超过128字节。字符只接受数字,大小写字母,下划线(_)和连字符(-) */
7
+ sn: string
8
+ /** 设备票据,5分钟内有效 */
9
+ snTicket: string
10
+ /** 设备型号 id。通过微信公众平台注册设备获得。 */
11
+ modelId: string
12
+ /** 设备名称,将显示在授权弹窗内(长度不超过13)。授权框中「设备名字」= 「deviceName」 + 「modelId 对应设备型号」 */
13
+ deviceName: string
14
+ /** 是否为授权设备组,默认 false */
15
+ isGroup?: boolean
16
+ /** 设备组的唯一标识 id 。isGroup 为 true 时只需要传该参数,isGroup 为 false 时不需要传该参数,但需要传 sn、snTicket、modelId、deviceName 。 */
17
+ groupId: string
18
+ /** 接口调用结束的回调函数(调用成功、失败都会执行) */
19
+ complete?: (res: TaroGeneral.CallbackResult) => void
20
+ /** 接口调用失败的回调函数 */
21
+ fail?: (res: TaroGeneral.CallbackResult) => void
22
+ /** 接口调用成功的回调函数 */
23
+ success?: (result: SuccessCallbackResult) => void
24
+ }
25
+ }
26
+
27
+ namespace getDeviceVoIPList {
28
+ interface Option {
29
+ /** 接口调用结束的回调函数(调用成功、失败都会执行) */
30
+ complete?: (res: TaroGeneral.CallbackResult) => void
31
+ /** 接口调用失败的回调函数 */
32
+ fail?: (res: TaroGeneral.CallbackResult) => void
33
+ /** 接口调用成功的回调函数 */
34
+ success?: (result: SuccessCallbackResult) => void
35
+ }
36
+ interface SuccessCallbackResult extends TaroGeneral.CallbackResult {
37
+ list: DeviceVoIP[]
38
+ }
39
+ interface DeviceVoIP {
40
+ /** 设备唯一序列号。(仅单台设备时) */
41
+ sn: string
42
+ /** 设备型号 id。通过微信公众平台注册设备获得。(仅单台设备时) */
43
+ model_id: string
44
+ /** 设备组的唯一标识 id(仅设备组时) */
45
+ group_id: string
46
+ /** 设备(组)授权状态。0:未授权;1:已授权 */
47
+ status: number
48
+ }
49
+ }
50
+
51
+ interface TaroStatic {
52
+ /** 请求用户授权与设备(组)间进行音视频通话
53
+ * @supported weapp
54
+ * @see https://developers.weixin.qq.com/miniprogram/dev/api/open-api/device-voip/wx.requestDeviceVoIP.html
55
+ */
56
+ requestDeviceVoIP(option: requestDeviceVoIP.Option): Promise<TaroGeneral.CallbackResult>
57
+ /** 查询当前用户授权的音视频通话设备(组)信息
58
+ * @supported weapp
59
+ * @see https://developers.weixin.qq.com/miniprogram/dev/api/open-api/device-voip/wx.getDeviceVoIPList.html
60
+ */
61
+ getDeviceVoIPList(option: getDeviceVoIPList.Option): Promise<getDeviceVoIPList.SuccessCallbackResult>
62
+ }
63
+ }
@@ -0,0 +1,198 @@
1
+ import Taro from '../../index'
2
+
3
+ declare module '../../index' {
4
+ interface CacheManager {
5
+ /** 添加规则
6
+ * @supported weapp
7
+ * @see https://developers.weixin.qq.com/miniprogram/dev/api/storage/cachemanager/CacheManager.addRule.html
8
+ */
9
+ addRule(option: CacheManager.AddRuleOption): string
10
+ /** 批量添加规则
11
+ * @supported weapp
12
+ * @see https://developers.weixin.qq.com/miniprogram/dev/api/storage/cachemanager/CacheManager.addRules.html
13
+ */
14
+ addRules(option: CacheManager.AddRulesOption): string[]
15
+ /** 清空所有缓存
16
+ * @supported weapp
17
+ * @see https://developers.weixin.qq.com/miniprogram/dev/api/storage/cachemanager/CacheManager.clearCaches.html
18
+ */
19
+ clearCaches(): void
20
+ /** 清空所有规则,同时会删除对应规则下所有缓存
21
+ * @supported weapp
22
+ * @see https://developers.weixin.qq.com/miniprogram/dev/api/storage/cachemanager/CacheManager.clearRules.html
23
+ */
24
+ clearRules(): void
25
+ /** 删除缓存
26
+ * @supported weapp
27
+ * @see https://developers.weixin.qq.com/miniprogram/dev/api/storage/cachemanager/CacheManager.deleteCache.html
28
+ */
29
+ deleteCache(
30
+ /** 缓存 id */
31
+ id: string
32
+ ): void
33
+ /** 批量删除缓存
34
+ * @supported weapp
35
+ * @see https://developers.weixin.qq.com/miniprogram/dev/api/storage/cachemanager/CacheManager.deleteCaches.html
36
+ */
37
+ deleteCaches(
38
+ /** 缓存 id 列表 */
39
+ ids: string[]
40
+ ): void
41
+ /** 删除规则,同时会删除对应规则下所有缓存
42
+ * @supported weapp
43
+ * @see https://developers.weixin.qq.com/miniprogram/dev/api/storage/cachemanager/CacheManager.deleteRule.html
44
+ */
45
+ deleteRule(
46
+ /** 规则 id */
47
+ id: string
48
+ ): void
49
+ /** 批量删除规则,同时会删除对应规则下所有缓存
50
+ * @supported weapp
51
+ * @see https://developers.weixin.qq.com/miniprogram/dev/api/storage/cachemanager/CacheManager.deleteRules.html
52
+ */
53
+ deleteRules(
54
+ /** 规则 id 列表 */
55
+ ids: string[]
56
+ ): void
57
+ /** 匹配命中的缓存规则,一般需要和 request 事件搭配使用
58
+ * @supported weapp
59
+ * @see https://developers.weixin.qq.com/miniprogram/dev/api/storage/cachemanager/CacheManager.match.html
60
+ */
61
+ match(option: CacheManager.MatchOption): CacheManager.MatchResult
62
+ /** 取消事件监听
63
+ * @supported weapp
64
+ * @see https://developers.weixin.qq.com/miniprogram/dev/api/storage/cachemanager/CacheManager.off.html
65
+ */
66
+ off(
67
+ /** 事件名称 */
68
+ eventName: string,
69
+ /** 事件监听函数 */
70
+ handler: Function
71
+ ): void
72
+ /** 监听事件
73
+ * @supported weapp
74
+ * @see https://developers.weixin.qq.com/miniprogram/dev/api/storage/cachemanager/CacheManager.on.html
75
+ */
76
+ on(
77
+ /** 事件名称 */
78
+ eventName: keyof CacheManager.OnEventName,
79
+ /** 事件监听函数 */
80
+ handler: Function
81
+ ): void
82
+ /** 开启缓存,仅在 mode 为 none 时生效,调用后缓存管理器的 state 会置为 1
83
+ * @supported weapp
84
+ * @see https://developers.weixin.qq.com/miniprogram/dev/api/storage/cachemanager/CacheManager.start.html
85
+ */
86
+ start(): void
87
+ /** 关闭缓存,仅在 mode 为 none 时生效,调用后缓存管理器的 state 会置为 0
88
+ * @supported weapp
89
+ * @see https://developers.weixin.qq.com/miniprogram/dev/api/storage/cachemanager/CacheManager.stop.html
90
+ */
91
+ stop(): void
92
+ }
93
+
94
+ namespace CacheManager {
95
+ interface DataSchema {
96
+ /** 需要匹配的 data 对象的参数类型
97
+ * string、number、boolean、null、object、any(表示任意类型),
98
+ * 同时支持数组模式(数组模式则在类型后面加 [],如 string[] 表示字符串数组)
99
+ */
100
+ type: string
101
+ /** 需要匹配的 data 对象的参数值
102
+ * 当 type 为基本类型时,可以用 string/regexp 来匹配固定的值,
103
+ * 也可以通过 function 来确定值是否匹配,
104
+ * 如果传入的 type 是 object,那么表示需要嵌套匹配值是否正确,可以传入 Array
105
+ */
106
+ value?: string | RegExp | Function | DataRule[]
107
+ }
108
+ interface DataRule {
109
+ /** 需要匹配的参数名 */
110
+ name: string
111
+ schema: DataSchema | DataSchema[]
112
+ }
113
+ interface RuleObject {
114
+ /** 规则 id,如果不填则会由基础库生成 */
115
+ id: string
116
+ /** 请求方法,可选值 GET/POST/PATCH/PUT/DELETE,如果为空则表示前面提到的所有方法都能被匹配到 */
117
+ method: string
118
+ /** uri 匹配规则,可参考规则字符串写法和正则写法 */
119
+ url: any
120
+ /**
121
+ * 缓存有效时间,单位为 ms,不填则默认取缓存管理器全局的缓存有效时间
122
+ * @default 7 * 24 * 60 * 60 * 1000
123
+ */
124
+ maxAge: number
125
+ /**
126
+ * 匹配请求参数
127
+ */
128
+ dataSchema: DataRule[]
129
+ }
130
+
131
+ type Rule = string | RegExp | RuleObject
132
+
133
+ interface AddRuleOption {
134
+ /** 规则 */
135
+ rule: Rule
136
+ }
137
+ interface AddRulesOption {
138
+ rules: Rule[]
139
+ }
140
+ interface MatchOption {
141
+ /** request 事件对象 */
142
+ evt: any
143
+ }
144
+ interface MatchResult {
145
+ /** 命中的规则id */
146
+ ruleId: string
147
+ /** 缓存id */
148
+ cacheId: string
149
+ /** 缓存内容,会带有 fromCache 标记,方便开发者区分内容是否来自缓存 */
150
+ data: any
151
+ /** 缓存创建时间 */
152
+ createTime: number
153
+ /** 缓存有效时间 */
154
+ maxAge: number
155
+ }
156
+ interface OnEventName {
157
+ /** 发生 wx.request 请求,只在缓存管理器开启阶段会触发 */
158
+ request
159
+ /** 进入弱网/离线状态 */
160
+ enterWeakNetwork
161
+ /** 离开弱网/离线状态 */
162
+ exitWeakNetwork
163
+ }
164
+ }
165
+
166
+ namespace createCacheManager {
167
+ interface Mode {
168
+ /** 弱网/离线使用缓存返回 */
169
+ weakNetwork
170
+ /** 总是使用缓存返回 */
171
+ always
172
+ /** 不开启,后续可手动开启/停止使用缓存返回 */
173
+ none
174
+ }
175
+ interface Extra {
176
+ /** 需要缓存的 wx api 接口,不传则表示支持缓存的接口全都做缓存处理。返回的如果是缓存数据,开发者可通过 fromCache 标记区分 */
177
+ apiList?: string[]
178
+ }
179
+ interface Option {
180
+ /** 全局 origin */
181
+ origin?: string
182
+ /** 缓存模式 */
183
+ mode?: keyof Mode
184
+ /** 全局缓存有效时间,单位为毫秒,默认为 7 天,最长不超过 30 天 */
185
+ maxAge?: number
186
+ /** 额外的缓存处理 */
187
+ extra?: Extra
188
+ }
189
+ }
190
+
191
+ interface TaroStatic {
192
+ /** 拉起手机发送短信界面
193
+ * @supported weap
194
+ * @see declare module '../../index'
195
+ */
196
+ createCacheManager(option: createCacheManager.Option): CacheManager
197
+ }
198
+ }
@@ -5,8 +5,11 @@ import type HtmlWebpackPlugin from 'html-webpack-plugin'
5
5
  import type { IOption, IPostcssOption } from './util'
6
6
 
7
7
  export interface IH5RouterConfig {
8
+ /** 配置路由模式 */
8
9
  mode?: 'hash' | 'browser' | 'multi'
10
+ /** 配置自定义路由 */
9
11
  customRoutes?: IOption
12
+ /** 配置路由基准路径 */
10
13
  basename?: string
11
14
  lazyload?: boolean | ((pagename: string) => boolean)
12
15
  renamePagename?: (pagename: string) => string
@@ -14,37 +17,95 @@ export interface IH5RouterConfig {
14
17
  }
15
18
 
16
19
  export interface IH5Config {
20
+ /** 设置输出解析文件的目录(默认值:'/')*/
17
21
  publicPath?: string
22
+
23
+ /** h5 编译后的静态文件目录(默认值:'static') */
18
24
  staticDirectory?: string
25
+
26
+ /** 编译后非 entry 的 js 文件的存放目录,主要影响动态引入的 pages 的存放路径(默认值:'chunk') */
19
27
  chunkDirectory?: string
20
28
 
21
29
  webpack?: ((webpackConfig: Webpack.Configuration, webpack) => Webpack.Configuration) | Webpack.Configuration
22
30
 
31
+ /**
32
+ * 自定义 Webpack 配置
33
+ * @param chain [webpackChain](https://github.com/neutrinojs/webpack-chain) 对象
34
+ * @param webpack webpack 实例
35
+ */
23
36
  webpackChain?: (chain: Chain, webpack: typeof Webpack) => void
24
37
 
38
+ /** 可用于修改、拓展 Webpack 的 output 选项,配置项参考[官方文档](https://webpack.js.org/configuration/output/) */
25
39
  output?: Webpack.Configuration['output']
40
+
41
+ /** 路由相关的配置 */
26
42
  router?: IH5RouterConfig
43
+
44
+ /** 预览服务的配置,可以更改端口等参数。具体配置参考 [webpack-dev-server](https://webpack.js.org/configuration/dev-server) */
27
45
  devServer?: webpackDevServer.Configuration
28
- sourceMapType?: 'none' | 'eval' | 'cheap-eval-source-map' | 'cheap-module-eval-source-map' | 'eval-source-map' | 'cheap-source-map' | 'cheap-module-source-map' | 'inline-cheap-source-map' | 'inline-cheap-module-source-map' | 'source-map' | 'inline-source-map' | 'hidden-source-map' | 'nosources-source-map'
46
+
47
+ /** 具体配置请参考 [Webpack devtool](https://webpack.js.org/configuration/devtool/#devtool) 配置 (默认值:'cheap-module-eval-source-map')*/
48
+ sourceMapType?:
49
+ | 'none'
50
+ | 'eval'
51
+ | 'cheap-eval-source-map'
52
+ | 'cheap-module-eval-source-map'
53
+ | 'eval-source-map'
54
+ | 'cheap-source-map'
55
+ | 'cheap-module-source-map'
56
+ | 'inline-cheap-source-map'
57
+ | 'inline-cheap-module-source-map'
58
+ | 'source-map'
59
+ | 'inline-source-map'
60
+ | 'hidden-source-map'
61
+ | 'nosources-source-map'
62
+
63
+ /** extract 功能开关,开启后将使用 mini-css-extract-plugin 分离 css 文件,可通过 h5.miniCssExtractPluginOption 对插件进行配置 (默认值:watch 模式下为 false,否则为 true) */
29
64
  enableExtract?: boolean
30
- transformOnly?: boolean
31
65
 
66
+ /** [css-loader](https://github.com/webpack-contrib/css-loader) 的附加配置 */
32
67
  cssLoaderOption?: IOption
68
+
69
+ /** [style-loader](https://github.com/webpack-contrib/style-loader) 的附加配置 */
33
70
  styleLoaderOption?: IOption
71
+
72
+ /** [sass-loader](https://github.com/webpack-contrib/sass-loader) 的附加配置 */
34
73
  sassLoaderOption?: IOption
74
+
75
+ /** [less-loader](https://github.com/webpack-contrib/less-loader) 的附加配置 */
35
76
  lessLoaderOption?: IOption
77
+
78
+ /** [stylus-loader](https://github.com/shama/stylus-loader) 的附加配置 */
36
79
  stylusLoaderOption?: IOption
80
+
81
+ /** 针对 mp4 | webm | ogg | mp3 | wav | flac | aac 文件的 [url-loader](https://github.com/webpack-contrib/url-loader) 配置 */
37
82
  mediaUrlLoaderOption?: IOption
83
+
84
+ /** 针对 woff | woff2 | eot | ttf | otf 文件的 [url-loader](https://github.com/webpack-contrib/url-loader) 配置 */
38
85
  fontUrlLoaderOption?: IOption
86
+
87
+ /** 针对 png | jpg | jpeg | gif | bpm | svg 文件的 [url-loader](https://github.com/webpack-contrib/url-loader) 配置 */
39
88
  imageUrlLoaderOption?: IOption
89
+
90
+ /** [mini-css-extract-plugin](https://github.com/webpack-contrib/mini-css-extract-plugin) 的附加配置 */
40
91
  miniCssExtractPluginOption?: IOption
92
+
93
+ /** 配置需要额外的经由 Taro 预设的 postcss 编译的模块 */
41
94
  esnextModules?: string[]
95
+
96
+ /** 用于控制在 H5 端是否使用兼容性组件库,详情请看 [React 兼容性组件库](https://taro-docs.jd.com/docs/next/h5#react-兼容性组件库)。(默认值:false) */
42
97
  useHtmlComponents?: boolean
98
+
99
+ /** 用于控制在 H5 端是否使用旧版本适配器,旧版本采用全局注册组件,懒加载组件相关依赖;新版本适配器会自动注册相关组件,不再需要引入 @tarojs/components/loader 中的全局 defineCustomElements 方法。(默认值:false) */
43
100
  useDeprecatedAdapterComponent?: boolean
44
101
 
102
+ /** 配置 postcss 相关插件 */
45
103
  postcss?: IPostcssOption
104
+
105
+ /** html-webpack-plugin 的具体配置 */
46
106
  htmlPluginOption?: HtmlWebpackPlugin.Options
47
107
 
108
+ /** Web 编译过程的相关配置 */
48
109
  compile?: {
49
110
  exclude?: any[]
50
111
  include?: any[]
@@ -1,6 +1,6 @@
1
1
  import type Webpack from 'webpack'
2
2
  import type Chain from 'webpack-chain'
3
- import type { IMINI_APP_FILE_TYPE, IOption, IPostcssOption } from './util'
3
+ import type { IOption, IPostcssOption } from './util'
4
4
 
5
5
  interface Runtime {
6
6
  enableInnerHTML: boolean
@@ -13,36 +13,88 @@ interface Runtime {
13
13
  }
14
14
 
15
15
  export interface IMiniAppConfig {
16
- appOutput?: boolean
16
+ /** 默认值:'cheap-module-source-map', 具体参考[Webpack devtool 配置](https://webpack.js.org/configuration/devtool/#devtool) */
17
17
  sourceMapType?: string
18
+
19
+ /** 指定 React 框架相关的代码是否使用开发环境(未压缩)代码,默认使用生产环境(压缩后)代码 */
18
20
  debugReact?: boolean
21
+
22
+ /** 压缩小程序 xml 文件的相关配置 */
19
23
  minifyXML?: {
24
+ /** 是否合并 xml 文件中的空格 (默认false) */
20
25
  collapseWhitespace?: boolean
21
26
  }
22
27
 
28
+ /**
29
+ * 自定义 Webpack 配置
30
+ * @param chain [webpackChain](https://github.com/neutrinojs/webpack-chain) 对象
31
+ * @param webpack webpack 实例
32
+ * @param PARSE_AST_TYPE 小程序编译时的文件类型集合
33
+ * @returns
34
+ */
23
35
  webpackChain?: (chain: Chain, webpack: typeof Webpack, PARSE_AST_TYPE: any) => void
24
- output?: Webpack.Configuration['output']
36
+
37
+ /** 可用于修改、拓展 Webpack 的 [output](https://webpack.js.org/configuration/output/) 选项 */
38
+ output?: Webpack.Configuration['output'] & {
39
+ /**
40
+ * 编译前清空输出目录
41
+ * @since Taro v3.6.9
42
+ * @description
43
+ * - 默认清空输出目录,可设置 clean: false 不清空
44
+ * - 可设置 clean: { keep: ['project.config.json'] } 保留指定文件
45
+ * - 注意 clean.keep 不支持函数
46
+ */
47
+ clean?: boolean | {
48
+ /** 保留指定文件不删除 */
49
+ keep?: Array<string | RegExp> | string | RegExp
50
+ }
51
+ }
52
+
53
+ /** 配置 postcss 相关插件 */
25
54
  postcss?: IPostcssOption
55
+
56
+ /** [css-loader](https://github.com/webpack-contrib/css-loader) 的附加配置 */
26
57
  cssLoaderOption?: IOption
58
+
59
+ /** [sass-loader](https://github.com/webpack-contrib/sass-loader) 的附加配置 */
27
60
  sassLoaderOption?: IOption
61
+
62
+ /** [less-loader](https://github.com/webpack-contrib/less-loader) 的附加配置 */
28
63
  lessLoaderOption?: IOption
64
+
65
+ /** [stylus-loader](https://github.com/shama/stylus-loader) 的附加配置 */
29
66
  stylusLoaderOption?: IOption
67
+
68
+ /** 针对 mp4 | webm | ogg | mp3 | wav | flac | aac 文件的 [url-loader](https://github.com/webpack-contrib/url-loader) 配置 */
30
69
  mediaUrlLoaderOption?: IOption
70
+
71
+ /** 针对 woff | woff2 | eot | ttf | otf 文件的 [url-loader](https://github.com/webpack-contrib/url-loader) 配置 */
31
72
  fontUrlLoaderOption?: IOption
73
+
74
+ /** 针对 png | jpg | jpeg | gif | bpm | svg 文件的 [url-loader](https://github.com/webpack-contrib/url-loader) 配置 */
32
75
  imageUrlLoaderOption?: IOption
76
+
77
+ /** [mini-css-extract-plugin](https://github.com/webpack-contrib/mini-css-extract-plugin) 的附加配置 */
33
78
  miniCssExtractPluginOption?: IOption
34
79
 
35
- customFilesTypes?: IMINI_APP_FILE_TYPE
80
+ /** 用于告诉 Taro 编译器需要抽取的公共文件 */
36
81
  commonChunks?: string[] | ((commonChunks: string[]) => string[])
37
- addChunkPages?: ((pages: Map<string, string[]>, pagesNames?: string[]) => void)
82
+
83
+ /** 为某些页面单独指定需要引用的公共文件 */
84
+ addChunkPages?: (pages: Map<string, string[]>, pagesNames?: string[]) => void
85
+
86
+ /** 优化主包的体积大小 */
38
87
  optimizeMainPackage?: {
39
88
  enable?: boolean
40
89
  exclude?: any[]
41
90
  }
42
91
 
92
+ /** 小程序编译过程的相关配置 */
43
93
  compile?: {
44
94
  exclude?: any[]
45
95
  include?: any[]
46
96
  }
97
+
98
+ /** 插件内部使用 */
47
99
  runtime?: Runtime
48
100
  }