@tarojs/taro 4.2.1-beta.0 → 4.2.1-beta.2
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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tarojs/taro",
|
|
3
|
-
"version": "4.2.1-beta.
|
|
3
|
+
"version": "4.2.1-beta.2",
|
|
4
4
|
"description": "Taro framework",
|
|
5
5
|
"author": "O2Team",
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@types/postcss-url": "^10.0.4",
|
|
27
|
-
"@tarojs/api": "4.2.1-beta.
|
|
28
|
-
"@tarojs/runtime": "4.2.1-beta.
|
|
27
|
+
"@tarojs/api": "4.2.1-beta.2",
|
|
28
|
+
"@tarojs/runtime": "4.2.1-beta.2"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"html-webpack-plugin": "^5.6.0",
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
"webpack-chain": "^6.5.1",
|
|
34
34
|
"webpack-dev-server": "^4.15.2",
|
|
35
35
|
"rollup": "^3.29.4",
|
|
36
|
-
"@tarojs/components": "4.2.1-beta.
|
|
37
|
-
"@tarojs/helper": "4.2.1-beta.
|
|
38
|
-
"@tarojs/shared": "4.2.1-beta.
|
|
36
|
+
"@tarojs/components": "4.2.1-beta.2",
|
|
37
|
+
"@tarojs/helper": "4.2.1-beta.2",
|
|
38
|
+
"@tarojs/shared": "4.2.1-beta.2"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"@types/react": "^18",
|
|
@@ -46,9 +46,9 @@
|
|
|
46
46
|
"webpack": "^5",
|
|
47
47
|
"webpack-chain": "^6",
|
|
48
48
|
"webpack-dev-server": "^4",
|
|
49
|
-
"@tarojs/components": "4.2.1-beta.
|
|
50
|
-
"@tarojs/helper": "4.2.1-beta.
|
|
51
|
-
"@tarojs/shared": "4.2.1-beta.
|
|
49
|
+
"@tarojs/components": "4.2.1-beta.2",
|
|
50
|
+
"@tarojs/helper": "4.2.1-beta.2",
|
|
51
|
+
"@tarojs/shared": "4.2.1-beta.2"
|
|
52
52
|
},
|
|
53
53
|
"peerDependenciesMeta": {
|
|
54
54
|
"@types/react": {
|
|
@@ -11,6 +11,11 @@ declare module '../../index' {
|
|
|
11
11
|
interface Option {
|
|
12
12
|
/** 剪贴板的内容 */
|
|
13
13
|
data: string
|
|
14
|
+
/** 其他配置项 */
|
|
15
|
+
options?: {
|
|
16
|
+
/** 隐藏默认的 “内容已复制” message */
|
|
17
|
+
hideDefaultMessage: boolean
|
|
18
|
+
}
|
|
14
19
|
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
15
20
|
complete?: (res: TaroGeneral.CallbackResult) => void
|
|
16
21
|
/** 接口调用失败的回调函数 */
|
|
@@ -15,6 +15,21 @@ declare module '../../index' {
|
|
|
15
15
|
formData?: TaroGeneral.IAnyObject
|
|
16
16
|
/** 超时时间,单位为毫秒 */
|
|
17
17
|
timeout?: number
|
|
18
|
+
/** 是否开启 profile。开启后可在接口回调的 res.profile 中查看性能调试信息
|
|
19
|
+
* @default true
|
|
20
|
+
* @supported weapp
|
|
21
|
+
*/
|
|
22
|
+
enableProfile?: boolean
|
|
23
|
+
/** 是否开启 http2
|
|
24
|
+
* @default false
|
|
25
|
+
* @supported weapp
|
|
26
|
+
*/
|
|
27
|
+
enableHttp2?: boolean
|
|
28
|
+
/** 是否开启 Quic/h3 协议
|
|
29
|
+
* @default false
|
|
30
|
+
* @supported weapp
|
|
31
|
+
*/
|
|
32
|
+
enableQuic?: boolean
|
|
18
33
|
/** 上传的文件名
|
|
19
34
|
* @supported h5
|
|
20
35
|
*/
|
|
@@ -52,6 +67,11 @@ declare module '../../index' {
|
|
|
52
67
|
* @weapp 非官方文档标注属性
|
|
53
68
|
*/
|
|
54
69
|
cookies?: string[]
|
|
70
|
+
/** 网络请求过程中一些调试信息
|
|
71
|
+
* @supported weapp
|
|
72
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/framework/performance/network.html
|
|
73
|
+
*/
|
|
74
|
+
profile?: TaroGeneral.IAnyObject
|
|
55
75
|
}
|
|
56
76
|
}
|
|
57
77
|
|
package/types/compile/hooks.d.ts
CHANGED
package/types/taro.config.d.ts
CHANGED
|
@@ -246,6 +246,12 @@ declare module './index' {
|
|
|
246
246
|
* shared 表示页面 wxss 样式将影响到自定义组件,自定义组件 wxss 中指定的样式也会影响页面和其他设置了 apply-shared 或 shared 的自定义组件。(这个选项在插件中不可用。)
|
|
247
247
|
*/
|
|
248
248
|
styleIsolation?: 'isolated' | 'apply-shared' | 'shared'
|
|
249
|
+
/**
|
|
250
|
+
* 构建期是否为递归壳 comp 开启额外实例绑定;同一编译 root 内任一页为 true 则该 root 的 comp 生效。
|
|
251
|
+
* 不会写入小程序页面 json。
|
|
252
|
+
* @default false
|
|
253
|
+
*/
|
|
254
|
+
forceCustomWrapper?: boolean
|
|
249
255
|
/**
|
|
250
256
|
* 设置导航栏额外图标,目前支持设置属性 icon,值为图标 url(以 https/http 开头)或 base64 字符串,大小建议 30*30 px
|
|
251
257
|
*
|
|
@@ -331,6 +337,47 @@ declare module './index' {
|
|
|
331
337
|
plugins?: Plugins
|
|
332
338
|
}
|
|
333
339
|
|
|
340
|
+
/** 子分包独立模板 root 配置项,可以是路径字符串或包含额外选项的对象 */
|
|
341
|
+
type SubPackageIndieRootConfig = string | {
|
|
342
|
+
/** 分包根路径(相对于 sourceDir) */
|
|
343
|
+
path: string
|
|
344
|
+
/**
|
|
345
|
+
* 是否禁用递归组件(comp/custom-wrapper/recursive-component)的生成。
|
|
346
|
+
* 设为 true 时,该 root 下不会生成 comp.*、custom-wrapper.*、recursive-component.js,
|
|
347
|
+
* base.wxml 最后一层的 container template 也不会引用 <comp>,超出 baseLevel 的节点将被静默截断。
|
|
348
|
+
* @default false
|
|
349
|
+
*/
|
|
350
|
+
disableRecursiveComponent?: boolean
|
|
351
|
+
/**
|
|
352
|
+
* 异步分包配置。配置 asyncRoot 后启用。
|
|
353
|
+
* 启用后,该 root 中通过 `import()` 动态引入的模块会由 webpack 原生异步 chunk 处理,
|
|
354
|
+
* 并单独打包到指定的异步子包。
|
|
355
|
+
*
|
|
356
|
+
* 限制:
|
|
357
|
+
* - asyncRoot 下注册的页面是占位 `<view />`,不会注入 `usingComponents`。
|
|
358
|
+
* 因此 asyncRoot 包含自定义组件 chunk 时,自定义组件应放在 sourceRoot 的页面里使用,
|
|
359
|
+
* 而非由占位页面直接消费。
|
|
360
|
+
* - 与 `lazyCodeLoading: 'requiredComponents'` 兼容。
|
|
361
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/framework/subpackages/async.html
|
|
362
|
+
* @since 4.1.12
|
|
363
|
+
*/
|
|
364
|
+
asyncSubPackage?: {
|
|
365
|
+
/**
|
|
366
|
+
* 异步子包根路径(相对于 sourceDir),必填。
|
|
367
|
+
* 多个 root 配置相同的 asyncRoot 时,它们的动态 import 产物会合并到同一个异步子包。
|
|
368
|
+
*/
|
|
369
|
+
asyncRoot: string
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
/** 子分包独立模板配置项 */
|
|
374
|
+
interface SubPackageIndieConfig {
|
|
375
|
+
/** 主入口分包根路径(相对于 sourceDir),runtime chunks 将生成到此目录 */
|
|
376
|
+
mainPackageRoot: SubPackageIndieRootConfig
|
|
377
|
+
/** 子组件分包根路径列表,只生成独立的模板文件 */
|
|
378
|
+
subPackageRoots?: SubPackageIndieRootConfig[]
|
|
379
|
+
}
|
|
380
|
+
|
|
334
381
|
interface Plugins {
|
|
335
382
|
[key: string]: {
|
|
336
383
|
version: string
|
|
@@ -470,6 +517,23 @@ declare module './index' {
|
|
|
470
517
|
*/
|
|
471
518
|
subPackages?: SubPackage[]
|
|
472
519
|
subpackages?: SubPackage[]
|
|
520
|
+
/** 子分包独立模板配置(用于 newBlended 模式),支持多入口配置
|
|
521
|
+
* @example
|
|
522
|
+
* ```js
|
|
523
|
+
* subPackageIndie: [
|
|
524
|
+
* {
|
|
525
|
+
* mainPackageRoot: 'pages/order/index',
|
|
526
|
+
* subPackageRoots: ['pages/order/list', 'pages/order/detail']
|
|
527
|
+
* },
|
|
528
|
+
* {
|
|
529
|
+
* mainPackageRoot: 'pages/user/index',
|
|
530
|
+
* subPackageRoots: ['pages/user/profile']
|
|
531
|
+
* }
|
|
532
|
+
* ]
|
|
533
|
+
* ```
|
|
534
|
+
* @since 4.1.x
|
|
535
|
+
*/
|
|
536
|
+
subPackageIndie?: SubPackageIndieConfig[]
|
|
473
537
|
/** Worker 代码放置的目录
|
|
474
538
|
* 使用 Worker 处理多线程任务时,设置 Worker 代码放置的目录
|
|
475
539
|
* @since 1.9.90
|