fix: not using the mode from the config file (#539)
This commit is contained in:
parent
73dfee5a4f
commit
3605aca1e8
|
@ -141,6 +141,7 @@ export async function resolveConfig(
|
||||||
|
|
||||||
if (loadResult.config.main) {
|
if (loadResult.config.main) {
|
||||||
const mainViteConfig: ViteConfig = mergeConfig(loadResult.config.main, deepClone(config))
|
const mainViteConfig: ViteConfig = mergeConfig(loadResult.config.main, deepClone(config))
|
||||||
|
mainViteConfig.mode = inlineConfig.mode || loadResult.config.main.mode || defaultMode
|
||||||
|
|
||||||
if (outDir) {
|
if (outDir) {
|
||||||
resetOutDir(mainViteConfig, outDir, 'main')
|
resetOutDir(mainViteConfig, outDir, 'main')
|
||||||
|
@ -161,6 +162,7 @@ export async function resolveConfig(
|
||||||
|
|
||||||
if (loadResult.config.preload) {
|
if (loadResult.config.preload) {
|
||||||
const preloadViteConfig: ViteConfig = mergeConfig(loadResult.config.preload, deepClone(config))
|
const preloadViteConfig: ViteConfig = mergeConfig(loadResult.config.preload, deepClone(config))
|
||||||
|
preloadViteConfig.mode = inlineConfig.mode || loadResult.config.preload.mode || defaultMode
|
||||||
|
|
||||||
if (outDir) {
|
if (outDir) {
|
||||||
resetOutDir(preloadViteConfig, outDir, 'preload')
|
resetOutDir(preloadViteConfig, outDir, 'preload')
|
||||||
|
@ -178,6 +180,7 @@ export async function resolveConfig(
|
||||||
|
|
||||||
if (loadResult.config.renderer) {
|
if (loadResult.config.renderer) {
|
||||||
const rendererViteConfig: ViteConfig = mergeConfig(loadResult.config.renderer, deepClone(config))
|
const rendererViteConfig: ViteConfig = mergeConfig(loadResult.config.renderer, deepClone(config))
|
||||||
|
rendererViteConfig.mode = inlineConfig.mode || loadResult.config.renderer.mode || defaultMode
|
||||||
|
|
||||||
if (outDir) {
|
if (outDir) {
|
||||||
resetOutDir(rendererViteConfig, outDir, 'renderer')
|
resetOutDir(rendererViteConfig, outDir, 'renderer')
|
||||||
|
|
Loading…
Reference in a new issue