MCPcopy
hub / github.com/electron/forge / getBuildConfigs

Method getBuildConfigs

packages/plugin/vite/src/ViteConfig.ts:74–87  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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)) {

Callers 2

VitePluginClass · 0.80
ViteConfig.spec.tsFile · 0.80

Calls 1

resolveConfigMethod · 0.95

Tested by

no test coverage detected