@tarojs/taro 4.1.5 → 4.1.6-beta.0

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.1.5",
3
+ "version": "4.1.6-beta.0",
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.1.5",
28
- "@tarojs/runtime": "4.1.5"
27
+ "@tarojs/api": "4.1.6-beta.0",
28
+ "@tarojs/runtime": "4.1.6-beta.0"
29
29
  },
30
30
  "devDependencies": {
31
31
  "html-webpack-plugin": "^5.6.0",
@@ -34,9 +34,9 @@
34
34
  "webpack-chain": "^6.5.1",
35
35
  "webpack-dev-server": "^4.15.2",
36
36
  "rollup": "^3.29.4",
37
- "@tarojs/components": "4.1.5",
38
- "@tarojs/shared": "4.1.5",
39
- "@tarojs/helper": "4.1.5"
37
+ "@tarojs/components": "4.1.6-beta.0",
38
+ "@tarojs/helper": "4.1.6-beta.0",
39
+ "@tarojs/shared": "4.1.6-beta.0"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "@types/react": "^18",
@@ -47,9 +47,9 @@
47
47
  "webpack": "^5",
48
48
  "webpack-chain": "^6",
49
49
  "webpack-dev-server": "^4",
50
- "@tarojs/components": "4.1.5",
51
- "@tarojs/helper": "4.1.5",
52
- "@tarojs/shared": "4.1.5"
50
+ "@tarojs/helper": "4.1.6-beta.0",
51
+ "@tarojs/shared": "4.1.6-beta.0",
52
+ "@tarojs/components": "4.1.6-beta.0"
53
53
  },
54
54
  "peerDependenciesMeta": {
55
55
  "@types/react": {
@@ -6,6 +6,7 @@ import type { IOption, IPostcssOption, IUrlLoaderOption } from './util'
6
6
  import type { OutputOptions as RollupOutputOptions } from 'rollup'
7
7
  import type { Compiler, CompilerTypes, CompilerWebpackTypes } from '../compiler'
8
8
  import type { OutputExt } from './project'
9
+ import type { ServerOptions as ViteServerOptions } from 'vite'
9
10
 
10
11
  export interface IH5RouterConfig {
11
12
  /** 配置路由模式 */
@@ -51,7 +52,8 @@ export interface IH5Config <T extends CompilerTypes = CompilerWebpackTypes> {
51
52
  router?: IH5RouterConfig
52
53
 
53
54
  /** 预览服务的配置,可以更改端口等参数。具体配置参考 [webpack-dev-server](https://webpack.js.org/configuration/dev-server) */
54
- devServer?: webpackDevServer.Configuration
55
+ // 修改后:同时支持 Webpack 和 Vite
56
+ devServer?: T extends 'vite' ? ViteServerOptions : webpackDevServer.Configuration
55
57
 
56
58
  /** 用于控制是否生成 js、css 对应的 sourceMap (默认值:watch 模式下为 true,否则为 false) */
57
59
  enableSourceMap?: boolean