Skip to content

Commit

Permalink
fix: Use Vite's mergeConfig to merge values instead of overwriting (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Artur- committed Nov 9, 2021
1 parent 654a7d4 commit 8dcafc1
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions flow-server/src/main/resources/vite.generated.ts
Expand Up @@ -9,7 +9,7 @@ import * as net from 'net';

import { processThemeResources } from '@vaadin/application-theme-plugin/theme-handle.js';
import settings from '#settingsImport#';
import { UserConfigFn, defineConfig, HtmlTagDescriptor } from 'vite';
import { UserConfigFn, defineConfig, HtmlTagDescriptor, mergeConfig } from 'vite';

const frontendFolder = path.resolve(__dirname, settings.frontendFolder);
const themeFolder = path.resolve(frontendFolder, settings.themeFolder);
Expand Down Expand Up @@ -120,8 +120,5 @@ export const vaadinConfig: UserConfigFn = (env) => {
};

export const overrideVaadinConfig = (customConfig: UserConfigFn) => {
return defineConfig((env) => ({
...vaadinConfig(env),
...customConfig(env)
}));
return defineConfig((env) => mergeConfig(vaadinConfig(env), customConfig(env)));
};

0 comments on commit 8dcafc1

Please sign in to comment.