@tarojs/taro 3.7.0-alpha.23 → 3.7.0-alpha.25
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": "3.7.0-alpha.
|
|
3
|
+
"version": "3.7.0-alpha.25",
|
|
4
4
|
"description": "Taro framework",
|
|
5
5
|
"homepage": "https://github.com/nervjs/taro/tree/master/packages/taro#readme",
|
|
6
6
|
"main": "index.js",
|
|
@@ -21,12 +21,12 @@
|
|
|
21
21
|
"author": "O2Team",
|
|
22
22
|
"license": "MIT",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@tarojs/api": "3.7.0-alpha.
|
|
25
|
-
"@tarojs/runtime": "3.7.0-alpha.
|
|
24
|
+
"@tarojs/api": "3.7.0-alpha.25",
|
|
25
|
+
"@tarojs/runtime": "3.7.0-alpha.25"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@tarojs/helper": "3.7.0-alpha.
|
|
29
|
-
"@tarojs/shared": "3.7.0-alpha.
|
|
28
|
+
"@tarojs/helper": "3.7.0-alpha.25",
|
|
29
|
+
"@tarojs/shared": "3.7.0-alpha.25"
|
|
30
30
|
},
|
|
31
31
|
"peerDependenciesMeta": {
|
|
32
32
|
"@types/react": {
|
|
@@ -104,7 +104,7 @@ export interface IH5Config <T extends CompilerTypes = CompilerWebpackTypes> {
|
|
|
104
104
|
useDeprecatedAdapterComponent?: boolean
|
|
105
105
|
|
|
106
106
|
/** 配置 postcss 相关插件 */
|
|
107
|
-
postcss?: IPostcssOption<'
|
|
107
|
+
postcss?: IPostcssOption<'h5'>
|
|
108
108
|
|
|
109
109
|
/** html-webpack-plugin 的具体配置 */
|
|
110
110
|
htmlPluginOption?: HtmlWebpackPlugin.Options
|
|
@@ -115,6 +115,6 @@ export interface IH5Config <T extends CompilerTypes = CompilerWebpackTypes> {
|
|
|
115
115
|
include?: (string | RegExp)[]
|
|
116
116
|
filter?: (filename: string) => boolean
|
|
117
117
|
}
|
|
118
|
-
/**
|
|
119
|
-
|
|
118
|
+
/** 生成的代码是否要兼容旧版浏览器,值为 true 时,会去读取 package.json 的 browserslist 字段。只在 vite 编译模式下有效 */
|
|
119
|
+
legacy?: T extends 'vite' ? boolean : undefined
|
|
120
120
|
}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { type } from 'os'
|
|
2
1
|
import type { Input } from 'postcss'
|
|
3
|
-
|
|
4
2
|
import type { Options as PostcssUrlOption } from 'postcss-url'
|
|
5
3
|
|
|
6
4
|
export type Func = (...args: any[]) => any
|
|
@@ -12,8 +10,8 @@ export type TogglableOptions<T = IOption> = {
|
|
|
12
10
|
config?: T
|
|
13
11
|
}
|
|
14
12
|
|
|
15
|
-
export interface IUrlLoaderOption extends IOption {
|
|
16
|
-
limit?: number | boolean
|
|
13
|
+
export interface IUrlLoaderOption extends IOption {
|
|
14
|
+
limit?: number | boolean
|
|
17
15
|
name?: ((moduleId: string) => string) | string
|
|
18
16
|
}
|
|
19
17
|
|
|
@@ -79,7 +77,7 @@ export interface IPxTransformOption {
|
|
|
79
77
|
deviceRatio?: TaroGeneral.TDeviceRatio
|
|
80
78
|
/** 平台 */
|
|
81
79
|
platform?: 'weapp' | 'h5' | string
|
|
82
|
-
/**
|
|
80
|
+
/** filter 回调函数,可 exclude 不处理的文件 */
|
|
83
81
|
exclude?: (fileName: string) => boolean
|
|
84
82
|
}
|
|
85
83
|
|
|
@@ -92,12 +90,10 @@ interface IBasePostcssOption {
|
|
|
92
90
|
[key: string]: any
|
|
93
91
|
}
|
|
94
92
|
|
|
95
|
-
export type IPostcssOption<T = '
|
|
96
|
-
? IBasePostcssOption & { url?: PostcssOption.url }
|
|
93
|
+
export type IPostcssOption<T = 'h5' | 'mini'> = T extends 'h5'
|
|
94
|
+
? IBasePostcssOption & { url?: PostcssOption.url }
|
|
97
95
|
: IBasePostcssOption
|
|
98
96
|
|
|
99
|
-
export type Conifg = ViteConfg | WebpackConfig
|
|
100
|
-
|
|
101
97
|
export interface ICopyOptions {
|
|
102
98
|
patterns: {
|
|
103
99
|
from: string
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { AppConfig, PageConfig } from
|
|
2
|
-
import type { IMiniFilesConfig, IH5Config, IMiniAppConfig } from
|
|
1
|
+
import type { AppConfig, PageConfig } from '../index'
|
|
2
|
+
import type { IMiniFilesConfig, IH5Config, IMiniAppConfig } from './config'
|
|
3
3
|
import type { IProjectConfig } from './config/project'
|
|
4
4
|
import type { PluginContext } from "rollup"
|
|
5
5
|
import { IComponentConfig } from "./hooks"
|
|
@@ -109,10 +109,12 @@ export interface ViteCompilerContext<T> {
|
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
export interface ViteH5CompilerContext extends ViteCompilerContext<ViteH5BuildConfig> {
|
|
112
|
+
getBrowserslist: () => void
|
|
112
113
|
routerMeta: {
|
|
113
114
|
routerCreator: string
|
|
114
115
|
getRoutesConfig: (pageName?: string) => string
|
|
115
116
|
}
|
|
117
|
+
browserslist: string[]
|
|
116
118
|
}
|
|
117
119
|
|
|
118
120
|
export interface ViteMiniCompilerContext extends ViteCompilerContext<ViteMiniBuildConfig> {
|
|
@@ -125,4 +127,4 @@ export interface ViteMiniCompilerContext extends ViteCompilerContext<ViteMiniBui
|
|
|
125
127
|
getTemplatePath: (filePath: string) => string
|
|
126
128
|
getStylePath: (filePath: string) => string
|
|
127
129
|
getConfigPath: (filePath: string) => string
|
|
128
|
-
}
|
|
130
|
+
}
|