@tarojs/service 3.7.0-alpha.7 → 3.7.0-beta.1

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/service",
3
- "version": "3.7.0-alpha.7",
3
+ "version": "3.7.0-beta.1",
4
4
  "description": "Taro Service",
5
5
  "main": "index.js",
6
6
  "types": "types/index.d.ts",
@@ -30,9 +30,9 @@
30
30
  "tapable": "^1.1.3",
31
31
  "webpack-merge": "^4.2.2",
32
32
  "ora": "^5.0.0",
33
- "@tarojs/helper": "3.7.0-alpha.7",
34
- "@tarojs/shared": "3.7.0-alpha.7",
35
- "@tarojs/taro": "3.7.0-alpha.7"
33
+ "@tarojs/helper": "3.7.0-beta.1",
34
+ "@tarojs/shared": "3.7.0-beta.1",
35
+ "@tarojs/taro": "3.7.0-beta.1"
36
36
  },
37
37
  "devDependencies": {
38
38
  "vite": "^4.2.0",
@@ -1,6 +1,6 @@
1
1
  import type helper from '@tarojs/helper'
2
- import type { IProjectConfig } from '@tarojs/taro/types/compile'
3
- import type { IModifyWebpackChain } from '@tarojs/taro/types/compile/hooks'
2
+ import type { IMiniFilesConfig, IProjectConfig } from '@tarojs/taro/types/compile'
3
+ import type { IModifyChainData } from '@tarojs/taro/types/compile/hooks'
4
4
  import type joi from 'joi'
5
5
  import type Webpack from 'webpack'
6
6
  import type Chain from 'webpack-chain'
@@ -138,11 +138,11 @@ export declare interface IPluginContext {
138
138
  /**
139
139
  * 编译中修改 webpack 配置,在这个钩子中,你可以对 webpackChain 作出想要的调整,等同于配置 [`webpackChain`](./config-detail.md#miniwebpackchain)
140
140
  */
141
- modifyWebpackChain: (fn: (args: { chain: Chain, webpack: typeof Webpack, data?: IModifyWebpackChain }) => void) => void
141
+ modifyWebpackChain: (fn: (args: { chain: Chain, webpack: typeof Webpack, data?: IModifyChainData }) => void) => void
142
142
  /**
143
143
  * 编译中修改 vite 配置
144
144
  */
145
- modifyViteConfig: (fn: (args: { viteConfig: any, componentConfig?: IModifyWebpackChain['componentConfig'] }) => void) => void
145
+ modifyViteConfig: (fn: (args: { viteConfig: any, data?: IModifyChainData }) => void) => void
146
146
  /**
147
147
  * 修改编译后的结果
148
148
  */
@@ -150,7 +150,11 @@ export declare interface IPluginContext {
150
150
  /**
151
151
  * 修改编译过程中的页面组件配置
152
152
  */
153
- modifyMiniConfigs: (fn: (args: { configMap: any }) => void) => void
153
+ modifyMiniConfigs: (fn: (args: { configMap: IMiniFilesConfig }) => void) => void
154
+ /**
155
+ * 修改 Taro 编译配置
156
+ */
157
+ modifyRunnerOpts: (fn: (args: { opts: any }) => void) => void
154
158
 
155
159
  [key: string]: any
156
160
  }
@@ -1,6 +1,6 @@
1
1
  import type helper from '@tarojs/helper';
2
- import type { IProjectConfig } from '@tarojs/taro/types/compile';
3
- import type { IModifyWebpackChain } from '@tarojs/taro/types/compile/hooks';
2
+ import type { IMiniFilesConfig, IProjectConfig } from '@tarojs/taro/types/compile';
3
+ import type { IModifyChainData } from '@tarojs/taro/types/compile/hooks';
4
4
  import type joi from 'joi';
5
5
  import type Webpack from 'webpack';
6
6
  import type Chain from 'webpack-chain';
@@ -142,14 +142,14 @@ export declare interface IPluginContext {
142
142
  modifyWebpackChain: (fn: (args: {
143
143
  chain: Chain;
144
144
  webpack: typeof Webpack;
145
- data?: IModifyWebpackChain;
145
+ data?: IModifyChainData;
146
146
  }) => void) => void;
147
147
  /**
148
148
  * 编译中修改 vite 配置
149
149
  */
150
150
  modifyViteConfig: (fn: (args: {
151
151
  viteConfig: any;
152
- componentConfig?: IModifyWebpackChain['componentConfig'];
152
+ data?: IModifyChainData;
153
153
  }) => void) => void;
154
154
  /**
155
155
  * 修改编译后的结果
@@ -162,7 +162,13 @@ export declare interface IPluginContext {
162
162
  * 修改编译过程中的页面组件配置
163
163
  */
164
164
  modifyMiniConfigs: (fn: (args: {
165
- configMap: any;
165
+ configMap: IMiniFilesConfig;
166
+ }) => void) => void;
167
+ /**
168
+ * 修改 Taro 编译配置
169
+ */
170
+ modifyRunnerOpts: (fn: (args: {
171
+ opts: any;
166
172
  }) => void) => void;
167
173
  [key: string]: any;
168
174
  }