()
| 72 | } |
| 73 | |
| 74 | async getBuildConfigs(): Promise<UserConfig[]> { |
| 75 | if (!Array.isArray(this.pluginConfig.build)) { |
| 76 | throw new Error('"config.build" must be an Array'); |
| 77 | } |
| 78 | |
| 79 | const configs = this.pluginConfig.build |
| 80 | // Prevent load the default `vite.config.js` file. |
| 81 | .filter(({ config }) => config) |
| 82 | .map((buildConfig) => |
| 83 | this.resolveConfig(buildConfig, buildConfig.target ?? 'main'), |
| 84 | ); |
| 85 | |
| 86 | return await Promise.all(configs); |
| 87 | } |
| 88 | |
| 89 | async getRendererConfig(): Promise<UserConfig[]> { |
| 90 | if (!Array.isArray(this.pluginConfig.renderer)) { |
no test coverage detected