@tarojs/taro 4.0.0-alpha.19 → 4.0.0-alpha.20

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.0.0-alpha.19",
3
+ "version": "4.0.0-alpha.20",
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.0.0-alpha.19",
28
- "@tarojs/runtime": "4.0.0-alpha.19"
27
+ "@tarojs/api": "4.0.0-alpha.20",
28
+ "@tarojs/runtime": "4.0.0-alpha.20"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/react": "^18.3.1",
@@ -35,9 +35,9 @@
35
35
  "webpack-chain": "^6.5.1",
36
36
  "webpack-dev-server": "^4.15.2",
37
37
  "rollup": "^3.29.4",
38
- "@tarojs/components": "4.0.0-alpha.19",
39
- "@tarojs/helper": "4.0.0-alpha.19",
40
- "@tarojs/shared": "4.0.0-alpha.19"
38
+ "@tarojs/components": "4.0.0-alpha.20",
39
+ "@tarojs/shared": "4.0.0-alpha.20",
40
+ "@tarojs/helper": "4.0.0-alpha.20"
41
41
  },
42
42
  "peerDependencies": {
43
43
  "@types/react": "^18",
@@ -48,9 +48,9 @@
48
48
  "webpack": "^5",
49
49
  "webpack-chain": "^6",
50
50
  "webpack-dev-server": "^4",
51
- "@tarojs/helper": "4.0.0-alpha.19",
52
- "@tarojs/shared": "4.0.0-alpha.19",
53
- "@tarojs/components": "4.0.0-alpha.19"
51
+ "@tarojs/components": "4.0.0-alpha.20",
52
+ "@tarojs/shared": "4.0.0-alpha.20",
53
+ "@tarojs/helper": "4.0.0-alpha.20"
54
54
  },
55
55
  "peerDependenciesMeta": {
56
56
  "@types/react": {
@@ -1,10 +1,12 @@
1
1
  import type { swc } from '@tarojs/helper'
2
2
  import type Webpack from 'webpack'
3
3
 
4
- export type CompilerTypes = CompilerWebpackTypes | 'vite'
4
+ export type CompilerViteTypes = 'vite'
5
5
 
6
6
  export type CompilerWebpackTypes = 'webpack5'
7
7
 
8
+ export type CompilerTypes = CompilerWebpackTypes | CompilerViteTypes
9
+
8
10
  interface IPrebundle {
9
11
  enable?: boolean
10
12
  timings?: boolean
@@ -1,6 +1,7 @@
1
1
  export * from './h5'
2
2
  export * from './harmony'
3
3
  export * from './mini'
4
+ export * from './rn'
4
5
 
5
6
  export * from './manifest'
6
7
  export * from './project'
@@ -2,6 +2,7 @@ import type Webpack from 'webpack'
2
2
  import type Chain from 'webpack-chain'
3
3
  import type webpackDevServer from 'webpack-dev-server'
4
4
  import type HtmlWebpackPlugin from 'html-webpack-plugin'
5
+ import type { RollupOptions } from 'rollup'
5
6
  import type { IOption, IPostcssOption } from './util'
6
7
 
7
8
  export interface IRNConfig {
@@ -61,4 +62,24 @@ export interface IRNConfig {
61
62
 
62
63
  /** 设计稿尺寸换算规则 */
63
64
  deviceRatio?: TaroGeneral.TDeviceRatio
65
+
66
+ /** 原生组件编译配置 */
67
+ nativeComponents?: {
68
+ /**
69
+ * 外部依赖
70
+ */
71
+ external?: Array<string | RegExp> | ((arr: Array<string | RegExp>) => Array<string | RegExp>)
72
+ /**
73
+ * 设置外部依赖,如果返回 string, 则将该值作为 external, 我们默认将 node_modules 路径下的文件设置为外部依赖
74
+ */
75
+ exteranlResolve?: (importee: string, importer: string) => string
76
+ /**
77
+ * 组件输出路径,默认值为 'dist'
78
+ */
79
+ output?: string
80
+ /**
81
+ * 修改 Rollup 打包配置
82
+ */
83
+ modifyRollupConfig?: (config: RollupOptions, innerPlugins: { taroResolver: typeof taroResolver, styleTransformer: typeof styleTransformer }) => RollupOptions
84
+ }
64
85
  }