From 4ea748d1b42090b04f7d33426b0f092126e6fbfd Mon Sep 17 00:00:00 2001 From: Sergey Vinogradov Date: Mon, 13 Jan 2025 11:56:24 +0400 Subject: [PATCH] add plugin in shared config --- .../vite.config.ts | 27 ++++++------------- .../vite.config.ts | 27 ++++++------------- .../vite.config.ts | 27 ++++++------------- .../vite.config.ts | 27 ++++++------------- .../vite.config.ts | 27 ++++++------------- .../vite.config.ts | 25 ++++++----------- .../vite.config.ts | 27 ++++++------------- .../vite.config.ts | 27 ++++++------------- .../vite.config.ts | 27 ++++++------------- .../vite.config.ts | 27 ++++++------------- .../vite.config.ts | 27 ++++++------------- .../vite.config.ts | 27 ++++++------------- .../vite.config.ts | 27 ++++++------------- .../vite.config.ts | 27 ++++++------------- .../vite.config.ts | 27 ++++++------------- .../vite.config.ts | 27 ++++++------------- .../vite.config.ts | 27 ++++++------------- .../vite.config.ts | 27 ++++++------------- .../vite.config.ts | 27 ++++++------------- .../vite.config.ts | 27 ++++++------------- .../vite.config.ts | 27 ++++++------------- .../vite.config.ts | 27 ++++++------------- .../vite.config.ts | 27 ++++++------------- .../vite.config.ts | 27 ++++++------------- .../vite.config.ts | 27 ++++++------------- .../vite.config.ts | 27 ++++++------------- .../vite.config.ts | 27 ++++++------------- .../vite.config.ts | 27 ++++++------------- .../vite.config.ts | 27 ++++++------------- .../vite.config.ts | 27 ++++++------------- .../vite.config.ts | 27 ++++++------------- .../vite.config.ts | 27 ++++++------------- .../vite.config.ts | 27 ++++++------------- .../vite.config.ts | 27 ++++++------------- .../vite.config.ts | 27 ++++++------------- .../vite.config.ts | 27 ++++++------------- .../vite.config.ts | 27 ++++++------------- .../vite.config.ts | 27 ++++++------------- .../vite.config.ts | 27 ++++++------------- .../vite.config.ts | 27 ++++++------------- .../vite.config.ts | 27 ++++++------------- .../vite.config.ts | 27 ++++++------------- .../vite.config.ts | 27 ++++++------------- .../vite.config.ts | 27 ++++++------------- .../vite.config.ts | 27 ++++++------------- .../vite.config.ts | 27 ++++++------------- 46 files changed, 368 insertions(+), 872 deletions(-) diff --git a/vaadin-accordion-flow-parent/vaadin-accordion-flow-integration-tests/vite.config.ts b/vaadin-accordion-flow-parent/vaadin-accordion-flow-integration-tests/vite.config.ts index 1c5b58b6990..bd0ce4ce0ae 100644 --- a/vaadin-accordion-flow-parent/vaadin-accordion-flow-integration-tests/vite.config.ts +++ b/vaadin-accordion-flow-parent/vaadin-accordion-flow-integration-tests/vite.config.ts @@ -1,27 +1,16 @@ // @ts-ignore can not be resolved until NPM packages are installed -import { UserConfigFn } from 'vite'; +import { defineConfig, UserConfigFn } from 'vite'; // @ts-ignore can not be resolved until Flow generates base Vite config -import { overrideVaadinConfig } from './vite.generated'; -// import { useLocalWebComponents } from '../../shared/web-components-vite-plugin'; -import { useLitWebComponents } from '../../shared/web-components-vite-plugin'; +import { vaadinConfig } from './vite.generated'; +import { sharedConfig, mergeConfigs } from '../../shared/shared-vite-config'; const customConfig: UserConfigFn = (env) => ({ // Here you can add custom Vite parameters // https://vitejs.dev/config/ - - // Use local version of web-components, disabled by default - // To use this un-comment the lines below and change the path to - // the absolute path of your web-components repo's node_modules - // folder - // DO NOT COMMIT THESE CHANGES! - /* - plugins: [ - useLocalWebComponents('/path/to/web-components/node_modules') - ] - */ - plugins: [ - useLitWebComponents() - ] }); -export default overrideVaadinConfig(customConfig); +export default defineConfig((env) => mergeConfigs( + vaadinConfig(env), + sharedConfig(env), + customConfig(env) +)); diff --git a/vaadin-app-layout-flow-parent/vaadin-app-layout-flow-integration-tests/vite.config.ts b/vaadin-app-layout-flow-parent/vaadin-app-layout-flow-integration-tests/vite.config.ts index 1c5b58b6990..bd0ce4ce0ae 100644 --- a/vaadin-app-layout-flow-parent/vaadin-app-layout-flow-integration-tests/vite.config.ts +++ b/vaadin-app-layout-flow-parent/vaadin-app-layout-flow-integration-tests/vite.config.ts @@ -1,27 +1,16 @@ // @ts-ignore can not be resolved until NPM packages are installed -import { UserConfigFn } from 'vite'; +import { defineConfig, UserConfigFn } from 'vite'; // @ts-ignore can not be resolved until Flow generates base Vite config -import { overrideVaadinConfig } from './vite.generated'; -// import { useLocalWebComponents } from '../../shared/web-components-vite-plugin'; -import { useLitWebComponents } from '../../shared/web-components-vite-plugin'; +import { vaadinConfig } from './vite.generated'; +import { sharedConfig, mergeConfigs } from '../../shared/shared-vite-config'; const customConfig: UserConfigFn = (env) => ({ // Here you can add custom Vite parameters // https://vitejs.dev/config/ - - // Use local version of web-components, disabled by default - // To use this un-comment the lines below and change the path to - // the absolute path of your web-components repo's node_modules - // folder - // DO NOT COMMIT THESE CHANGES! - /* - plugins: [ - useLocalWebComponents('/path/to/web-components/node_modules') - ] - */ - plugins: [ - useLitWebComponents() - ] }); -export default overrideVaadinConfig(customConfig); +export default defineConfig((env) => mergeConfigs( + vaadinConfig(env), + sharedConfig(env), + customConfig(env) +)); diff --git a/vaadin-avatar-flow-parent/vaadin-avatar-flow-integration-tests/vite.config.ts b/vaadin-avatar-flow-parent/vaadin-avatar-flow-integration-tests/vite.config.ts index 1c5b58b6990..bd0ce4ce0ae 100644 --- a/vaadin-avatar-flow-parent/vaadin-avatar-flow-integration-tests/vite.config.ts +++ b/vaadin-avatar-flow-parent/vaadin-avatar-flow-integration-tests/vite.config.ts @@ -1,27 +1,16 @@ // @ts-ignore can not be resolved until NPM packages are installed -import { UserConfigFn } from 'vite'; +import { defineConfig, UserConfigFn } from 'vite'; // @ts-ignore can not be resolved until Flow generates base Vite config -import { overrideVaadinConfig } from './vite.generated'; -// import { useLocalWebComponents } from '../../shared/web-components-vite-plugin'; -import { useLitWebComponents } from '../../shared/web-components-vite-plugin'; +import { vaadinConfig } from './vite.generated'; +import { sharedConfig, mergeConfigs } from '../../shared/shared-vite-config'; const customConfig: UserConfigFn = (env) => ({ // Here you can add custom Vite parameters // https://vitejs.dev/config/ - - // Use local version of web-components, disabled by default - // To use this un-comment the lines below and change the path to - // the absolute path of your web-components repo's node_modules - // folder - // DO NOT COMMIT THESE CHANGES! - /* - plugins: [ - useLocalWebComponents('/path/to/web-components/node_modules') - ] - */ - plugins: [ - useLitWebComponents() - ] }); -export default overrideVaadinConfig(customConfig); +export default defineConfig((env) => mergeConfigs( + vaadinConfig(env), + sharedConfig(env), + customConfig(env) +)); diff --git a/vaadin-board-flow-parent/vaadin-board-flow-integration-tests/vite.config.ts b/vaadin-board-flow-parent/vaadin-board-flow-integration-tests/vite.config.ts index 1c5b58b6990..bd0ce4ce0ae 100644 --- a/vaadin-board-flow-parent/vaadin-board-flow-integration-tests/vite.config.ts +++ b/vaadin-board-flow-parent/vaadin-board-flow-integration-tests/vite.config.ts @@ -1,27 +1,16 @@ // @ts-ignore can not be resolved until NPM packages are installed -import { UserConfigFn } from 'vite'; +import { defineConfig, UserConfigFn } from 'vite'; // @ts-ignore can not be resolved until Flow generates base Vite config -import { overrideVaadinConfig } from './vite.generated'; -// import { useLocalWebComponents } from '../../shared/web-components-vite-plugin'; -import { useLitWebComponents } from '../../shared/web-components-vite-plugin'; +import { vaadinConfig } from './vite.generated'; +import { sharedConfig, mergeConfigs } from '../../shared/shared-vite-config'; const customConfig: UserConfigFn = (env) => ({ // Here you can add custom Vite parameters // https://vitejs.dev/config/ - - // Use local version of web-components, disabled by default - // To use this un-comment the lines below and change the path to - // the absolute path of your web-components repo's node_modules - // folder - // DO NOT COMMIT THESE CHANGES! - /* - plugins: [ - useLocalWebComponents('/path/to/web-components/node_modules') - ] - */ - plugins: [ - useLitWebComponents() - ] }); -export default overrideVaadinConfig(customConfig); +export default defineConfig((env) => mergeConfigs( + vaadinConfig(env), + sharedConfig(env), + customConfig(env) +)); diff --git a/vaadin-button-flow-parent/vaadin-button-flow-integration-tests/vite.config.ts b/vaadin-button-flow-parent/vaadin-button-flow-integration-tests/vite.config.ts index 1c5b58b6990..bd0ce4ce0ae 100644 --- a/vaadin-button-flow-parent/vaadin-button-flow-integration-tests/vite.config.ts +++ b/vaadin-button-flow-parent/vaadin-button-flow-integration-tests/vite.config.ts @@ -1,27 +1,16 @@ // @ts-ignore can not be resolved until NPM packages are installed -import { UserConfigFn } from 'vite'; +import { defineConfig, UserConfigFn } from 'vite'; // @ts-ignore can not be resolved until Flow generates base Vite config -import { overrideVaadinConfig } from './vite.generated'; -// import { useLocalWebComponents } from '../../shared/web-components-vite-plugin'; -import { useLitWebComponents } from '../../shared/web-components-vite-plugin'; +import { vaadinConfig } from './vite.generated'; +import { sharedConfig, mergeConfigs } from '../../shared/shared-vite-config'; const customConfig: UserConfigFn = (env) => ({ // Here you can add custom Vite parameters // https://vitejs.dev/config/ - - // Use local version of web-components, disabled by default - // To use this un-comment the lines below and change the path to - // the absolute path of your web-components repo's node_modules - // folder - // DO NOT COMMIT THESE CHANGES! - /* - plugins: [ - useLocalWebComponents('/path/to/web-components/node_modules') - ] - */ - plugins: [ - useLitWebComponents() - ] }); -export default overrideVaadinConfig(customConfig); +export default defineConfig((env) => mergeConfigs( + vaadinConfig(env), + sharedConfig(env), + customConfig(env) +)); diff --git a/vaadin-card-flow-parent/vaadin-card-flow-integration-tests/vite.config.ts b/vaadin-card-flow-parent/vaadin-card-flow-integration-tests/vite.config.ts index 94e0336f0fb..bd0ce4ce0ae 100644 --- a/vaadin-card-flow-parent/vaadin-card-flow-integration-tests/vite.config.ts +++ b/vaadin-card-flow-parent/vaadin-card-flow-integration-tests/vite.config.ts @@ -1,25 +1,16 @@ // @ts-ignore can not be resolved until NPM packages are installed -import { UserConfigFn } from 'vite'; +import { defineConfig, UserConfigFn } from 'vite'; // @ts-ignore can not be resolved until Flow generates base Vite config -import { overrideVaadinConfig } from './vite.generated'; -// import { useLocalWebComponents } from '../../shared/web-components-vite-plugin'; -import { useLitWebComponents } from '../../shared/web-components-vite-plugin'; +import { vaadinConfig } from './vite.generated'; +import { sharedConfig, mergeConfigs } from '../../shared/shared-vite-config'; const customConfig: UserConfigFn = (env) => ({ // Here you can add custom Vite parameters // https://vitejs.dev/config/ - - // Use local version of web-components, disabled by default - // To use this un-comment the lines below and change the path to - // the absolute path of your web-components repo's node_modules - // folder - // DO NOT COMMIT THESE CHANGES! - /* - plugins: [ - useLocalWebComponents('/path/to/web-components/node_modules') - ] - */ - plugins: [useLitWebComponents()] }); -export default overrideVaadinConfig(customConfig); +export default defineConfig((env) => mergeConfigs( + vaadinConfig(env), + sharedConfig(env), + customConfig(env) +)); diff --git a/vaadin-charts-flow-parent/vaadin-charts-flow-integration-tests/vite.config.ts b/vaadin-charts-flow-parent/vaadin-charts-flow-integration-tests/vite.config.ts index 1c5b58b6990..bd0ce4ce0ae 100644 --- a/vaadin-charts-flow-parent/vaadin-charts-flow-integration-tests/vite.config.ts +++ b/vaadin-charts-flow-parent/vaadin-charts-flow-integration-tests/vite.config.ts @@ -1,27 +1,16 @@ // @ts-ignore can not be resolved until NPM packages are installed -import { UserConfigFn } from 'vite'; +import { defineConfig, UserConfigFn } from 'vite'; // @ts-ignore can not be resolved until Flow generates base Vite config -import { overrideVaadinConfig } from './vite.generated'; -// import { useLocalWebComponents } from '../../shared/web-components-vite-plugin'; -import { useLitWebComponents } from '../../shared/web-components-vite-plugin'; +import { vaadinConfig } from './vite.generated'; +import { sharedConfig, mergeConfigs } from '../../shared/shared-vite-config'; const customConfig: UserConfigFn = (env) => ({ // Here you can add custom Vite parameters // https://vitejs.dev/config/ - - // Use local version of web-components, disabled by default - // To use this un-comment the lines below and change the path to - // the absolute path of your web-components repo's node_modules - // folder - // DO NOT COMMIT THESE CHANGES! - /* - plugins: [ - useLocalWebComponents('/path/to/web-components/node_modules') - ] - */ - plugins: [ - useLitWebComponents() - ] }); -export default overrideVaadinConfig(customConfig); +export default defineConfig((env) => mergeConfigs( + vaadinConfig(env), + sharedConfig(env), + customConfig(env) +)); diff --git a/vaadin-checkbox-flow-parent/vaadin-checkbox-flow-integration-tests/vite.config.ts b/vaadin-checkbox-flow-parent/vaadin-checkbox-flow-integration-tests/vite.config.ts index 1c5b58b6990..bd0ce4ce0ae 100644 --- a/vaadin-checkbox-flow-parent/vaadin-checkbox-flow-integration-tests/vite.config.ts +++ b/vaadin-checkbox-flow-parent/vaadin-checkbox-flow-integration-tests/vite.config.ts @@ -1,27 +1,16 @@ // @ts-ignore can not be resolved until NPM packages are installed -import { UserConfigFn } from 'vite'; +import { defineConfig, UserConfigFn } from 'vite'; // @ts-ignore can not be resolved until Flow generates base Vite config -import { overrideVaadinConfig } from './vite.generated'; -// import { useLocalWebComponents } from '../../shared/web-components-vite-plugin'; -import { useLitWebComponents } from '../../shared/web-components-vite-plugin'; +import { vaadinConfig } from './vite.generated'; +import { sharedConfig, mergeConfigs } from '../../shared/shared-vite-config'; const customConfig: UserConfigFn = (env) => ({ // Here you can add custom Vite parameters // https://vitejs.dev/config/ - - // Use local version of web-components, disabled by default - // To use this un-comment the lines below and change the path to - // the absolute path of your web-components repo's node_modules - // folder - // DO NOT COMMIT THESE CHANGES! - /* - plugins: [ - useLocalWebComponents('/path/to/web-components/node_modules') - ] - */ - plugins: [ - useLitWebComponents() - ] }); -export default overrideVaadinConfig(customConfig); +export default defineConfig((env) => mergeConfigs( + vaadinConfig(env), + sharedConfig(env), + customConfig(env) +)); diff --git a/vaadin-combo-box-flow-parent/vaadin-combo-box-flow-integration-tests/vite.config.ts b/vaadin-combo-box-flow-parent/vaadin-combo-box-flow-integration-tests/vite.config.ts index 1c5b58b6990..bd0ce4ce0ae 100644 --- a/vaadin-combo-box-flow-parent/vaadin-combo-box-flow-integration-tests/vite.config.ts +++ b/vaadin-combo-box-flow-parent/vaadin-combo-box-flow-integration-tests/vite.config.ts @@ -1,27 +1,16 @@ // @ts-ignore can not be resolved until NPM packages are installed -import { UserConfigFn } from 'vite'; +import { defineConfig, UserConfigFn } from 'vite'; // @ts-ignore can not be resolved until Flow generates base Vite config -import { overrideVaadinConfig } from './vite.generated'; -// import { useLocalWebComponents } from '../../shared/web-components-vite-plugin'; -import { useLitWebComponents } from '../../shared/web-components-vite-plugin'; +import { vaadinConfig } from './vite.generated'; +import { sharedConfig, mergeConfigs } from '../../shared/shared-vite-config'; const customConfig: UserConfigFn = (env) => ({ // Here you can add custom Vite parameters // https://vitejs.dev/config/ - - // Use local version of web-components, disabled by default - // To use this un-comment the lines below and change the path to - // the absolute path of your web-components repo's node_modules - // folder - // DO NOT COMMIT THESE CHANGES! - /* - plugins: [ - useLocalWebComponents('/path/to/web-components/node_modules') - ] - */ - plugins: [ - useLitWebComponents() - ] }); -export default overrideVaadinConfig(customConfig); +export default defineConfig((env) => mergeConfigs( + vaadinConfig(env), + sharedConfig(env), + customConfig(env) +)); diff --git a/vaadin-confirm-dialog-flow-parent/vaadin-confirm-dialog-flow-integration-tests/vite.config.ts b/vaadin-confirm-dialog-flow-parent/vaadin-confirm-dialog-flow-integration-tests/vite.config.ts index 1c5b58b6990..bd0ce4ce0ae 100644 --- a/vaadin-confirm-dialog-flow-parent/vaadin-confirm-dialog-flow-integration-tests/vite.config.ts +++ b/vaadin-confirm-dialog-flow-parent/vaadin-confirm-dialog-flow-integration-tests/vite.config.ts @@ -1,27 +1,16 @@ // @ts-ignore can not be resolved until NPM packages are installed -import { UserConfigFn } from 'vite'; +import { defineConfig, UserConfigFn } from 'vite'; // @ts-ignore can not be resolved until Flow generates base Vite config -import { overrideVaadinConfig } from './vite.generated'; -// import { useLocalWebComponents } from '../../shared/web-components-vite-plugin'; -import { useLitWebComponents } from '../../shared/web-components-vite-plugin'; +import { vaadinConfig } from './vite.generated'; +import { sharedConfig, mergeConfigs } from '../../shared/shared-vite-config'; const customConfig: UserConfigFn = (env) => ({ // Here you can add custom Vite parameters // https://vitejs.dev/config/ - - // Use local version of web-components, disabled by default - // To use this un-comment the lines below and change the path to - // the absolute path of your web-components repo's node_modules - // folder - // DO NOT COMMIT THESE CHANGES! - /* - plugins: [ - useLocalWebComponents('/path/to/web-components/node_modules') - ] - */ - plugins: [ - useLitWebComponents() - ] }); -export default overrideVaadinConfig(customConfig); +export default defineConfig((env) => mergeConfigs( + vaadinConfig(env), + sharedConfig(env), + customConfig(env) +)); diff --git a/vaadin-context-menu-flow-parent/vaadin-context-menu-flow-integration-tests/vite.config.ts b/vaadin-context-menu-flow-parent/vaadin-context-menu-flow-integration-tests/vite.config.ts index 1c5b58b6990..bd0ce4ce0ae 100644 --- a/vaadin-context-menu-flow-parent/vaadin-context-menu-flow-integration-tests/vite.config.ts +++ b/vaadin-context-menu-flow-parent/vaadin-context-menu-flow-integration-tests/vite.config.ts @@ -1,27 +1,16 @@ // @ts-ignore can not be resolved until NPM packages are installed -import { UserConfigFn } from 'vite'; +import { defineConfig, UserConfigFn } from 'vite'; // @ts-ignore can not be resolved until Flow generates base Vite config -import { overrideVaadinConfig } from './vite.generated'; -// import { useLocalWebComponents } from '../../shared/web-components-vite-plugin'; -import { useLitWebComponents } from '../../shared/web-components-vite-plugin'; +import { vaadinConfig } from './vite.generated'; +import { sharedConfig, mergeConfigs } from '../../shared/shared-vite-config'; const customConfig: UserConfigFn = (env) => ({ // Here you can add custom Vite parameters // https://vitejs.dev/config/ - - // Use local version of web-components, disabled by default - // To use this un-comment the lines below and change the path to - // the absolute path of your web-components repo's node_modules - // folder - // DO NOT COMMIT THESE CHANGES! - /* - plugins: [ - useLocalWebComponents('/path/to/web-components/node_modules') - ] - */ - plugins: [ - useLitWebComponents() - ] }); -export default overrideVaadinConfig(customConfig); +export default defineConfig((env) => mergeConfigs( + vaadinConfig(env), + sharedConfig(env), + customConfig(env) +)); diff --git a/vaadin-cookie-consent-flow-parent/vaadin-cookie-consent-flow-integration-tests/vite.config.ts b/vaadin-cookie-consent-flow-parent/vaadin-cookie-consent-flow-integration-tests/vite.config.ts index 1c5b58b6990..bd0ce4ce0ae 100644 --- a/vaadin-cookie-consent-flow-parent/vaadin-cookie-consent-flow-integration-tests/vite.config.ts +++ b/vaadin-cookie-consent-flow-parent/vaadin-cookie-consent-flow-integration-tests/vite.config.ts @@ -1,27 +1,16 @@ // @ts-ignore can not be resolved until NPM packages are installed -import { UserConfigFn } from 'vite'; +import { defineConfig, UserConfigFn } from 'vite'; // @ts-ignore can not be resolved until Flow generates base Vite config -import { overrideVaadinConfig } from './vite.generated'; -// import { useLocalWebComponents } from '../../shared/web-components-vite-plugin'; -import { useLitWebComponents } from '../../shared/web-components-vite-plugin'; +import { vaadinConfig } from './vite.generated'; +import { sharedConfig, mergeConfigs } from '../../shared/shared-vite-config'; const customConfig: UserConfigFn = (env) => ({ // Here you can add custom Vite parameters // https://vitejs.dev/config/ - - // Use local version of web-components, disabled by default - // To use this un-comment the lines below and change the path to - // the absolute path of your web-components repo's node_modules - // folder - // DO NOT COMMIT THESE CHANGES! - /* - plugins: [ - useLocalWebComponents('/path/to/web-components/node_modules') - ] - */ - plugins: [ - useLitWebComponents() - ] }); -export default overrideVaadinConfig(customConfig); +export default defineConfig((env) => mergeConfigs( + vaadinConfig(env), + sharedConfig(env), + customConfig(env) +)); diff --git a/vaadin-crud-flow-parent/vaadin-crud-flow-integration-tests/vite.config.ts b/vaadin-crud-flow-parent/vaadin-crud-flow-integration-tests/vite.config.ts index 1c5b58b6990..bd0ce4ce0ae 100644 --- a/vaadin-crud-flow-parent/vaadin-crud-flow-integration-tests/vite.config.ts +++ b/vaadin-crud-flow-parent/vaadin-crud-flow-integration-tests/vite.config.ts @@ -1,27 +1,16 @@ // @ts-ignore can not be resolved until NPM packages are installed -import { UserConfigFn } from 'vite'; +import { defineConfig, UserConfigFn } from 'vite'; // @ts-ignore can not be resolved until Flow generates base Vite config -import { overrideVaadinConfig } from './vite.generated'; -// import { useLocalWebComponents } from '../../shared/web-components-vite-plugin'; -import { useLitWebComponents } from '../../shared/web-components-vite-plugin'; +import { vaadinConfig } from './vite.generated'; +import { sharedConfig, mergeConfigs } from '../../shared/shared-vite-config'; const customConfig: UserConfigFn = (env) => ({ // Here you can add custom Vite parameters // https://vitejs.dev/config/ - - // Use local version of web-components, disabled by default - // To use this un-comment the lines below and change the path to - // the absolute path of your web-components repo's node_modules - // folder - // DO NOT COMMIT THESE CHANGES! - /* - plugins: [ - useLocalWebComponents('/path/to/web-components/node_modules') - ] - */ - plugins: [ - useLitWebComponents() - ] }); -export default overrideVaadinConfig(customConfig); +export default defineConfig((env) => mergeConfigs( + vaadinConfig(env), + sharedConfig(env), + customConfig(env) +)); diff --git a/vaadin-custom-field-flow-parent/vaadin-custom-field-flow-integration-tests/vite.config.ts b/vaadin-custom-field-flow-parent/vaadin-custom-field-flow-integration-tests/vite.config.ts index 1c5b58b6990..bd0ce4ce0ae 100644 --- a/vaadin-custom-field-flow-parent/vaadin-custom-field-flow-integration-tests/vite.config.ts +++ b/vaadin-custom-field-flow-parent/vaadin-custom-field-flow-integration-tests/vite.config.ts @@ -1,27 +1,16 @@ // @ts-ignore can not be resolved until NPM packages are installed -import { UserConfigFn } from 'vite'; +import { defineConfig, UserConfigFn } from 'vite'; // @ts-ignore can not be resolved until Flow generates base Vite config -import { overrideVaadinConfig } from './vite.generated'; -// import { useLocalWebComponents } from '../../shared/web-components-vite-plugin'; -import { useLitWebComponents } from '../../shared/web-components-vite-plugin'; +import { vaadinConfig } from './vite.generated'; +import { sharedConfig, mergeConfigs } from '../../shared/shared-vite-config'; const customConfig: UserConfigFn = (env) => ({ // Here you can add custom Vite parameters // https://vitejs.dev/config/ - - // Use local version of web-components, disabled by default - // To use this un-comment the lines below and change the path to - // the absolute path of your web-components repo's node_modules - // folder - // DO NOT COMMIT THESE CHANGES! - /* - plugins: [ - useLocalWebComponents('/path/to/web-components/node_modules') - ] - */ - plugins: [ - useLitWebComponents() - ] }); -export default overrideVaadinConfig(customConfig); +export default defineConfig((env) => mergeConfigs( + vaadinConfig(env), + sharedConfig(env), + customConfig(env) +)); diff --git a/vaadin-dashboard-flow-parent/vaadin-dashboard-flow-integration-tests/vite.config.ts b/vaadin-dashboard-flow-parent/vaadin-dashboard-flow-integration-tests/vite.config.ts index 1c5b58b6990..bd0ce4ce0ae 100644 --- a/vaadin-dashboard-flow-parent/vaadin-dashboard-flow-integration-tests/vite.config.ts +++ b/vaadin-dashboard-flow-parent/vaadin-dashboard-flow-integration-tests/vite.config.ts @@ -1,27 +1,16 @@ // @ts-ignore can not be resolved until NPM packages are installed -import { UserConfigFn } from 'vite'; +import { defineConfig, UserConfigFn } from 'vite'; // @ts-ignore can not be resolved until Flow generates base Vite config -import { overrideVaadinConfig } from './vite.generated'; -// import { useLocalWebComponents } from '../../shared/web-components-vite-plugin'; -import { useLitWebComponents } from '../../shared/web-components-vite-plugin'; +import { vaadinConfig } from './vite.generated'; +import { sharedConfig, mergeConfigs } from '../../shared/shared-vite-config'; const customConfig: UserConfigFn = (env) => ({ // Here you can add custom Vite parameters // https://vitejs.dev/config/ - - // Use local version of web-components, disabled by default - // To use this un-comment the lines below and change the path to - // the absolute path of your web-components repo's node_modules - // folder - // DO NOT COMMIT THESE CHANGES! - /* - plugins: [ - useLocalWebComponents('/path/to/web-components/node_modules') - ] - */ - plugins: [ - useLitWebComponents() - ] }); -export default overrideVaadinConfig(customConfig); +export default defineConfig((env) => mergeConfigs( + vaadinConfig(env), + sharedConfig(env), + customConfig(env) +)); diff --git a/vaadin-date-picker-flow-parent/vaadin-date-picker-flow-integration-tests/vite.config.ts b/vaadin-date-picker-flow-parent/vaadin-date-picker-flow-integration-tests/vite.config.ts index 1c5b58b6990..bd0ce4ce0ae 100644 --- a/vaadin-date-picker-flow-parent/vaadin-date-picker-flow-integration-tests/vite.config.ts +++ b/vaadin-date-picker-flow-parent/vaadin-date-picker-flow-integration-tests/vite.config.ts @@ -1,27 +1,16 @@ // @ts-ignore can not be resolved until NPM packages are installed -import { UserConfigFn } from 'vite'; +import { defineConfig, UserConfigFn } from 'vite'; // @ts-ignore can not be resolved until Flow generates base Vite config -import { overrideVaadinConfig } from './vite.generated'; -// import { useLocalWebComponents } from '../../shared/web-components-vite-plugin'; -import { useLitWebComponents } from '../../shared/web-components-vite-plugin'; +import { vaadinConfig } from './vite.generated'; +import { sharedConfig, mergeConfigs } from '../../shared/shared-vite-config'; const customConfig: UserConfigFn = (env) => ({ // Here you can add custom Vite parameters // https://vitejs.dev/config/ - - // Use local version of web-components, disabled by default - // To use this un-comment the lines below and change the path to - // the absolute path of your web-components repo's node_modules - // folder - // DO NOT COMMIT THESE CHANGES! - /* - plugins: [ - useLocalWebComponents('/path/to/web-components/node_modules') - ] - */ - plugins: [ - useLitWebComponents() - ] }); -export default overrideVaadinConfig(customConfig); +export default defineConfig((env) => mergeConfigs( + vaadinConfig(env), + sharedConfig(env), + customConfig(env) +)); diff --git a/vaadin-date-time-picker-flow-parent/vaadin-date-time-picker-flow-integration-tests/vite.config.ts b/vaadin-date-time-picker-flow-parent/vaadin-date-time-picker-flow-integration-tests/vite.config.ts index 1c5b58b6990..bd0ce4ce0ae 100644 --- a/vaadin-date-time-picker-flow-parent/vaadin-date-time-picker-flow-integration-tests/vite.config.ts +++ b/vaadin-date-time-picker-flow-parent/vaadin-date-time-picker-flow-integration-tests/vite.config.ts @@ -1,27 +1,16 @@ // @ts-ignore can not be resolved until NPM packages are installed -import { UserConfigFn } from 'vite'; +import { defineConfig, UserConfigFn } from 'vite'; // @ts-ignore can not be resolved until Flow generates base Vite config -import { overrideVaadinConfig } from './vite.generated'; -// import { useLocalWebComponents } from '../../shared/web-components-vite-plugin'; -import { useLitWebComponents } from '../../shared/web-components-vite-plugin'; +import { vaadinConfig } from './vite.generated'; +import { sharedConfig, mergeConfigs } from '../../shared/shared-vite-config'; const customConfig: UserConfigFn = (env) => ({ // Here you can add custom Vite parameters // https://vitejs.dev/config/ - - // Use local version of web-components, disabled by default - // To use this un-comment the lines below and change the path to - // the absolute path of your web-components repo's node_modules - // folder - // DO NOT COMMIT THESE CHANGES! - /* - plugins: [ - useLocalWebComponents('/path/to/web-components/node_modules') - ] - */ - plugins: [ - useLitWebComponents() - ] }); -export default overrideVaadinConfig(customConfig); +export default defineConfig((env) => mergeConfigs( + vaadinConfig(env), + sharedConfig(env), + customConfig(env) +)); diff --git a/vaadin-details-flow-parent/vaadin-details-flow-integration-tests/vite.config.ts b/vaadin-details-flow-parent/vaadin-details-flow-integration-tests/vite.config.ts index 1c5b58b6990..bd0ce4ce0ae 100644 --- a/vaadin-details-flow-parent/vaadin-details-flow-integration-tests/vite.config.ts +++ b/vaadin-details-flow-parent/vaadin-details-flow-integration-tests/vite.config.ts @@ -1,27 +1,16 @@ // @ts-ignore can not be resolved until NPM packages are installed -import { UserConfigFn } from 'vite'; +import { defineConfig, UserConfigFn } from 'vite'; // @ts-ignore can not be resolved until Flow generates base Vite config -import { overrideVaadinConfig } from './vite.generated'; -// import { useLocalWebComponents } from '../../shared/web-components-vite-plugin'; -import { useLitWebComponents } from '../../shared/web-components-vite-plugin'; +import { vaadinConfig } from './vite.generated'; +import { sharedConfig, mergeConfigs } from '../../shared/shared-vite-config'; const customConfig: UserConfigFn = (env) => ({ // Here you can add custom Vite parameters // https://vitejs.dev/config/ - - // Use local version of web-components, disabled by default - // To use this un-comment the lines below and change the path to - // the absolute path of your web-components repo's node_modules - // folder - // DO NOT COMMIT THESE CHANGES! - /* - plugins: [ - useLocalWebComponents('/path/to/web-components/node_modules') - ] - */ - plugins: [ - useLitWebComponents() - ] }); -export default overrideVaadinConfig(customConfig); +export default defineConfig((env) => mergeConfigs( + vaadinConfig(env), + sharedConfig(env), + customConfig(env) +)); diff --git a/vaadin-dialog-flow-parent/vaadin-dialog-flow-integration-tests/vite.config.ts b/vaadin-dialog-flow-parent/vaadin-dialog-flow-integration-tests/vite.config.ts index 1c5b58b6990..bd0ce4ce0ae 100644 --- a/vaadin-dialog-flow-parent/vaadin-dialog-flow-integration-tests/vite.config.ts +++ b/vaadin-dialog-flow-parent/vaadin-dialog-flow-integration-tests/vite.config.ts @@ -1,27 +1,16 @@ // @ts-ignore can not be resolved until NPM packages are installed -import { UserConfigFn } from 'vite'; +import { defineConfig, UserConfigFn } from 'vite'; // @ts-ignore can not be resolved until Flow generates base Vite config -import { overrideVaadinConfig } from './vite.generated'; -// import { useLocalWebComponents } from '../../shared/web-components-vite-plugin'; -import { useLitWebComponents } from '../../shared/web-components-vite-plugin'; +import { vaadinConfig } from './vite.generated'; +import { sharedConfig, mergeConfigs } from '../../shared/shared-vite-config'; const customConfig: UserConfigFn = (env) => ({ // Here you can add custom Vite parameters // https://vitejs.dev/config/ - - // Use local version of web-components, disabled by default - // To use this un-comment the lines below and change the path to - // the absolute path of your web-components repo's node_modules - // folder - // DO NOT COMMIT THESE CHANGES! - /* - plugins: [ - useLocalWebComponents('/path/to/web-components/node_modules') - ] - */ - plugins: [ - useLitWebComponents() - ] }); -export default overrideVaadinConfig(customConfig); +export default defineConfig((env) => mergeConfigs( + vaadinConfig(env), + sharedConfig(env), + customConfig(env) +)); diff --git a/vaadin-field-highlighter-flow-parent/vaadin-field-highlighter-flow-integration-tests/vite.config.ts b/vaadin-field-highlighter-flow-parent/vaadin-field-highlighter-flow-integration-tests/vite.config.ts index 1c5b58b6990..bd0ce4ce0ae 100644 --- a/vaadin-field-highlighter-flow-parent/vaadin-field-highlighter-flow-integration-tests/vite.config.ts +++ b/vaadin-field-highlighter-flow-parent/vaadin-field-highlighter-flow-integration-tests/vite.config.ts @@ -1,27 +1,16 @@ // @ts-ignore can not be resolved until NPM packages are installed -import { UserConfigFn } from 'vite'; +import { defineConfig, UserConfigFn } from 'vite'; // @ts-ignore can not be resolved until Flow generates base Vite config -import { overrideVaadinConfig } from './vite.generated'; -// import { useLocalWebComponents } from '../../shared/web-components-vite-plugin'; -import { useLitWebComponents } from '../../shared/web-components-vite-plugin'; +import { vaadinConfig } from './vite.generated'; +import { sharedConfig, mergeConfigs } from '../../shared/shared-vite-config'; const customConfig: UserConfigFn = (env) => ({ // Here you can add custom Vite parameters // https://vitejs.dev/config/ - - // Use local version of web-components, disabled by default - // To use this un-comment the lines below and change the path to - // the absolute path of your web-components repo's node_modules - // folder - // DO NOT COMMIT THESE CHANGES! - /* - plugins: [ - useLocalWebComponents('/path/to/web-components/node_modules') - ] - */ - plugins: [ - useLitWebComponents() - ] }); -export default overrideVaadinConfig(customConfig); +export default defineConfig((env) => mergeConfigs( + vaadinConfig(env), + sharedConfig(env), + customConfig(env) +)); diff --git a/vaadin-form-layout-flow-parent/vaadin-form-layout-flow-integration-tests/vite.config.ts b/vaadin-form-layout-flow-parent/vaadin-form-layout-flow-integration-tests/vite.config.ts index 1c5b58b6990..bd0ce4ce0ae 100644 --- a/vaadin-form-layout-flow-parent/vaadin-form-layout-flow-integration-tests/vite.config.ts +++ b/vaadin-form-layout-flow-parent/vaadin-form-layout-flow-integration-tests/vite.config.ts @@ -1,27 +1,16 @@ // @ts-ignore can not be resolved until NPM packages are installed -import { UserConfigFn } from 'vite'; +import { defineConfig, UserConfigFn } from 'vite'; // @ts-ignore can not be resolved until Flow generates base Vite config -import { overrideVaadinConfig } from './vite.generated'; -// import { useLocalWebComponents } from '../../shared/web-components-vite-plugin'; -import { useLitWebComponents } from '../../shared/web-components-vite-plugin'; +import { vaadinConfig } from './vite.generated'; +import { sharedConfig, mergeConfigs } from '../../shared/shared-vite-config'; const customConfig: UserConfigFn = (env) => ({ // Here you can add custom Vite parameters // https://vitejs.dev/config/ - - // Use local version of web-components, disabled by default - // To use this un-comment the lines below and change the path to - // the absolute path of your web-components repo's node_modules - // folder - // DO NOT COMMIT THESE CHANGES! - /* - plugins: [ - useLocalWebComponents('/path/to/web-components/node_modules') - ] - */ - plugins: [ - useLitWebComponents() - ] }); -export default overrideVaadinConfig(customConfig); +export default defineConfig((env) => mergeConfigs( + vaadinConfig(env), + sharedConfig(env), + customConfig(env) +)); diff --git a/vaadin-grid-pro-flow-parent/vaadin-grid-pro-flow-integration-tests/vite.config.ts b/vaadin-grid-pro-flow-parent/vaadin-grid-pro-flow-integration-tests/vite.config.ts index 1c5b58b6990..bd0ce4ce0ae 100644 --- a/vaadin-grid-pro-flow-parent/vaadin-grid-pro-flow-integration-tests/vite.config.ts +++ b/vaadin-grid-pro-flow-parent/vaadin-grid-pro-flow-integration-tests/vite.config.ts @@ -1,27 +1,16 @@ // @ts-ignore can not be resolved until NPM packages are installed -import { UserConfigFn } from 'vite'; +import { defineConfig, UserConfigFn } from 'vite'; // @ts-ignore can not be resolved until Flow generates base Vite config -import { overrideVaadinConfig } from './vite.generated'; -// import { useLocalWebComponents } from '../../shared/web-components-vite-plugin'; -import { useLitWebComponents } from '../../shared/web-components-vite-plugin'; +import { vaadinConfig } from './vite.generated'; +import { sharedConfig, mergeConfigs } from '../../shared/shared-vite-config'; const customConfig: UserConfigFn = (env) => ({ // Here you can add custom Vite parameters // https://vitejs.dev/config/ - - // Use local version of web-components, disabled by default - // To use this un-comment the lines below and change the path to - // the absolute path of your web-components repo's node_modules - // folder - // DO NOT COMMIT THESE CHANGES! - /* - plugins: [ - useLocalWebComponents('/path/to/web-components/node_modules') - ] - */ - plugins: [ - useLitWebComponents() - ] }); -export default overrideVaadinConfig(customConfig); +export default defineConfig((env) => mergeConfigs( + vaadinConfig(env), + sharedConfig(env), + customConfig(env) +)); diff --git a/vaadin-icons-flow-parent/vaadin-icons-flow-integration-tests/vite.config.ts b/vaadin-icons-flow-parent/vaadin-icons-flow-integration-tests/vite.config.ts index 1c5b58b6990..bd0ce4ce0ae 100644 --- a/vaadin-icons-flow-parent/vaadin-icons-flow-integration-tests/vite.config.ts +++ b/vaadin-icons-flow-parent/vaadin-icons-flow-integration-tests/vite.config.ts @@ -1,27 +1,16 @@ // @ts-ignore can not be resolved until NPM packages are installed -import { UserConfigFn } from 'vite'; +import { defineConfig, UserConfigFn } from 'vite'; // @ts-ignore can not be resolved until Flow generates base Vite config -import { overrideVaadinConfig } from './vite.generated'; -// import { useLocalWebComponents } from '../../shared/web-components-vite-plugin'; -import { useLitWebComponents } from '../../shared/web-components-vite-plugin'; +import { vaadinConfig } from './vite.generated'; +import { sharedConfig, mergeConfigs } from '../../shared/shared-vite-config'; const customConfig: UserConfigFn = (env) => ({ // Here you can add custom Vite parameters // https://vitejs.dev/config/ - - // Use local version of web-components, disabled by default - // To use this un-comment the lines below and change the path to - // the absolute path of your web-components repo's node_modules - // folder - // DO NOT COMMIT THESE CHANGES! - /* - plugins: [ - useLocalWebComponents('/path/to/web-components/node_modules') - ] - */ - plugins: [ - useLitWebComponents() - ] }); -export default overrideVaadinConfig(customConfig); +export default defineConfig((env) => mergeConfigs( + vaadinConfig(env), + sharedConfig(env), + customConfig(env) +)); diff --git a/vaadin-list-box-flow-parent/vaadin-list-box-flow-integration-tests/vite.config.ts b/vaadin-list-box-flow-parent/vaadin-list-box-flow-integration-tests/vite.config.ts index 1c5b58b6990..bd0ce4ce0ae 100644 --- a/vaadin-list-box-flow-parent/vaadin-list-box-flow-integration-tests/vite.config.ts +++ b/vaadin-list-box-flow-parent/vaadin-list-box-flow-integration-tests/vite.config.ts @@ -1,27 +1,16 @@ // @ts-ignore can not be resolved until NPM packages are installed -import { UserConfigFn } from 'vite'; +import { defineConfig, UserConfigFn } from 'vite'; // @ts-ignore can not be resolved until Flow generates base Vite config -import { overrideVaadinConfig } from './vite.generated'; -// import { useLocalWebComponents } from '../../shared/web-components-vite-plugin'; -import { useLitWebComponents } from '../../shared/web-components-vite-plugin'; +import { vaadinConfig } from './vite.generated'; +import { sharedConfig, mergeConfigs } from '../../shared/shared-vite-config'; const customConfig: UserConfigFn = (env) => ({ // Here you can add custom Vite parameters // https://vitejs.dev/config/ - - // Use local version of web-components, disabled by default - // To use this un-comment the lines below and change the path to - // the absolute path of your web-components repo's node_modules - // folder - // DO NOT COMMIT THESE CHANGES! - /* - plugins: [ - useLocalWebComponents('/path/to/web-components/node_modules') - ] - */ - plugins: [ - useLitWebComponents() - ] }); -export default overrideVaadinConfig(customConfig); +export default defineConfig((env) => mergeConfigs( + vaadinConfig(env), + sharedConfig(env), + customConfig(env) +)); diff --git a/vaadin-login-flow-parent/vaadin-login-flow-integration-tests/vite.config.ts b/vaadin-login-flow-parent/vaadin-login-flow-integration-tests/vite.config.ts index 1c5b58b6990..bd0ce4ce0ae 100644 --- a/vaadin-login-flow-parent/vaadin-login-flow-integration-tests/vite.config.ts +++ b/vaadin-login-flow-parent/vaadin-login-flow-integration-tests/vite.config.ts @@ -1,27 +1,16 @@ // @ts-ignore can not be resolved until NPM packages are installed -import { UserConfigFn } from 'vite'; +import { defineConfig, UserConfigFn } from 'vite'; // @ts-ignore can not be resolved until Flow generates base Vite config -import { overrideVaadinConfig } from './vite.generated'; -// import { useLocalWebComponents } from '../../shared/web-components-vite-plugin'; -import { useLitWebComponents } from '../../shared/web-components-vite-plugin'; +import { vaadinConfig } from './vite.generated'; +import { sharedConfig, mergeConfigs } from '../../shared/shared-vite-config'; const customConfig: UserConfigFn = (env) => ({ // Here you can add custom Vite parameters // https://vitejs.dev/config/ - - // Use local version of web-components, disabled by default - // To use this un-comment the lines below and change the path to - // the absolute path of your web-components repo's node_modules - // folder - // DO NOT COMMIT THESE CHANGES! - /* - plugins: [ - useLocalWebComponents('/path/to/web-components/node_modules') - ] - */ - plugins: [ - useLitWebComponents() - ] }); -export default overrideVaadinConfig(customConfig); +export default defineConfig((env) => mergeConfigs( + vaadinConfig(env), + sharedConfig(env), + customConfig(env) +)); diff --git a/vaadin-lumo-theme-flow-parent/vaadin-lumo-theme-flow-integration-tests/vite.config.ts b/vaadin-lumo-theme-flow-parent/vaadin-lumo-theme-flow-integration-tests/vite.config.ts index 1c5b58b6990..bd0ce4ce0ae 100644 --- a/vaadin-lumo-theme-flow-parent/vaadin-lumo-theme-flow-integration-tests/vite.config.ts +++ b/vaadin-lumo-theme-flow-parent/vaadin-lumo-theme-flow-integration-tests/vite.config.ts @@ -1,27 +1,16 @@ // @ts-ignore can not be resolved until NPM packages are installed -import { UserConfigFn } from 'vite'; +import { defineConfig, UserConfigFn } from 'vite'; // @ts-ignore can not be resolved until Flow generates base Vite config -import { overrideVaadinConfig } from './vite.generated'; -// import { useLocalWebComponents } from '../../shared/web-components-vite-plugin'; -import { useLitWebComponents } from '../../shared/web-components-vite-plugin'; +import { vaadinConfig } from './vite.generated'; +import { sharedConfig, mergeConfigs } from '../../shared/shared-vite-config'; const customConfig: UserConfigFn = (env) => ({ // Here you can add custom Vite parameters // https://vitejs.dev/config/ - - // Use local version of web-components, disabled by default - // To use this un-comment the lines below and change the path to - // the absolute path of your web-components repo's node_modules - // folder - // DO NOT COMMIT THESE CHANGES! - /* - plugins: [ - useLocalWebComponents('/path/to/web-components/node_modules') - ] - */ - plugins: [ - useLitWebComponents() - ] }); -export default overrideVaadinConfig(customConfig); +export default defineConfig((env) => mergeConfigs( + vaadinConfig(env), + sharedConfig(env), + customConfig(env) +)); diff --git a/vaadin-map-flow-parent/vaadin-map-flow-integration-tests/vite.config.ts b/vaadin-map-flow-parent/vaadin-map-flow-integration-tests/vite.config.ts index 1c5b58b6990..bd0ce4ce0ae 100644 --- a/vaadin-map-flow-parent/vaadin-map-flow-integration-tests/vite.config.ts +++ b/vaadin-map-flow-parent/vaadin-map-flow-integration-tests/vite.config.ts @@ -1,27 +1,16 @@ // @ts-ignore can not be resolved until NPM packages are installed -import { UserConfigFn } from 'vite'; +import { defineConfig, UserConfigFn } from 'vite'; // @ts-ignore can not be resolved until Flow generates base Vite config -import { overrideVaadinConfig } from './vite.generated'; -// import { useLocalWebComponents } from '../../shared/web-components-vite-plugin'; -import { useLitWebComponents } from '../../shared/web-components-vite-plugin'; +import { vaadinConfig } from './vite.generated'; +import { sharedConfig, mergeConfigs } from '../../shared/shared-vite-config'; const customConfig: UserConfigFn = (env) => ({ // Here you can add custom Vite parameters // https://vitejs.dev/config/ - - // Use local version of web-components, disabled by default - // To use this un-comment the lines below and change the path to - // the absolute path of your web-components repo's node_modules - // folder - // DO NOT COMMIT THESE CHANGES! - /* - plugins: [ - useLocalWebComponents('/path/to/web-components/node_modules') - ] - */ - plugins: [ - useLitWebComponents() - ] }); -export default overrideVaadinConfig(customConfig); +export default defineConfig((env) => mergeConfigs( + vaadinConfig(env), + sharedConfig(env), + customConfig(env) +)); diff --git a/vaadin-material-theme-flow-parent/vaadin-material-theme-flow-integration-tests/vite.config.ts b/vaadin-material-theme-flow-parent/vaadin-material-theme-flow-integration-tests/vite.config.ts index 1c5b58b6990..bd0ce4ce0ae 100644 --- a/vaadin-material-theme-flow-parent/vaadin-material-theme-flow-integration-tests/vite.config.ts +++ b/vaadin-material-theme-flow-parent/vaadin-material-theme-flow-integration-tests/vite.config.ts @@ -1,27 +1,16 @@ // @ts-ignore can not be resolved until NPM packages are installed -import { UserConfigFn } from 'vite'; +import { defineConfig, UserConfigFn } from 'vite'; // @ts-ignore can not be resolved until Flow generates base Vite config -import { overrideVaadinConfig } from './vite.generated'; -// import { useLocalWebComponents } from '../../shared/web-components-vite-plugin'; -import { useLitWebComponents } from '../../shared/web-components-vite-plugin'; +import { vaadinConfig } from './vite.generated'; +import { sharedConfig, mergeConfigs } from '../../shared/shared-vite-config'; const customConfig: UserConfigFn = (env) => ({ // Here you can add custom Vite parameters // https://vitejs.dev/config/ - - // Use local version of web-components, disabled by default - // To use this un-comment the lines below and change the path to - // the absolute path of your web-components repo's node_modules - // folder - // DO NOT COMMIT THESE CHANGES! - /* - plugins: [ - useLocalWebComponents('/path/to/web-components/node_modules') - ] - */ - plugins: [ - useLitWebComponents() - ] }); -export default overrideVaadinConfig(customConfig); +export default defineConfig((env) => mergeConfigs( + vaadinConfig(env), + sharedConfig(env), + customConfig(env) +)); diff --git a/vaadin-menu-bar-flow-parent/vaadin-menu-bar-flow-integration-tests/vite.config.ts b/vaadin-menu-bar-flow-parent/vaadin-menu-bar-flow-integration-tests/vite.config.ts index 1c5b58b6990..bd0ce4ce0ae 100644 --- a/vaadin-menu-bar-flow-parent/vaadin-menu-bar-flow-integration-tests/vite.config.ts +++ b/vaadin-menu-bar-flow-parent/vaadin-menu-bar-flow-integration-tests/vite.config.ts @@ -1,27 +1,16 @@ // @ts-ignore can not be resolved until NPM packages are installed -import { UserConfigFn } from 'vite'; +import { defineConfig, UserConfigFn } from 'vite'; // @ts-ignore can not be resolved until Flow generates base Vite config -import { overrideVaadinConfig } from './vite.generated'; -// import { useLocalWebComponents } from '../../shared/web-components-vite-plugin'; -import { useLitWebComponents } from '../../shared/web-components-vite-plugin'; +import { vaadinConfig } from './vite.generated'; +import { sharedConfig, mergeConfigs } from '../../shared/shared-vite-config'; const customConfig: UserConfigFn = (env) => ({ // Here you can add custom Vite parameters // https://vitejs.dev/config/ - - // Use local version of web-components, disabled by default - // To use this un-comment the lines below and change the path to - // the absolute path of your web-components repo's node_modules - // folder - // DO NOT COMMIT THESE CHANGES! - /* - plugins: [ - useLocalWebComponents('/path/to/web-components/node_modules') - ] - */ - plugins: [ - useLitWebComponents() - ] }); -export default overrideVaadinConfig(customConfig); +export default defineConfig((env) => mergeConfigs( + vaadinConfig(env), + sharedConfig(env), + customConfig(env) +)); diff --git a/vaadin-messages-flow-parent/vaadin-messages-flow-integration-tests/vite.config.ts b/vaadin-messages-flow-parent/vaadin-messages-flow-integration-tests/vite.config.ts index 1c5b58b6990..bd0ce4ce0ae 100644 --- a/vaadin-messages-flow-parent/vaadin-messages-flow-integration-tests/vite.config.ts +++ b/vaadin-messages-flow-parent/vaadin-messages-flow-integration-tests/vite.config.ts @@ -1,27 +1,16 @@ // @ts-ignore can not be resolved until NPM packages are installed -import { UserConfigFn } from 'vite'; +import { defineConfig, UserConfigFn } from 'vite'; // @ts-ignore can not be resolved until Flow generates base Vite config -import { overrideVaadinConfig } from './vite.generated'; -// import { useLocalWebComponents } from '../../shared/web-components-vite-plugin'; -import { useLitWebComponents } from '../../shared/web-components-vite-plugin'; +import { vaadinConfig } from './vite.generated'; +import { sharedConfig, mergeConfigs } from '../../shared/shared-vite-config'; const customConfig: UserConfigFn = (env) => ({ // Here you can add custom Vite parameters // https://vitejs.dev/config/ - - // Use local version of web-components, disabled by default - // To use this un-comment the lines below and change the path to - // the absolute path of your web-components repo's node_modules - // folder - // DO NOT COMMIT THESE CHANGES! - /* - plugins: [ - useLocalWebComponents('/path/to/web-components/node_modules') - ] - */ - plugins: [ - useLitWebComponents() - ] }); -export default overrideVaadinConfig(customConfig); +export default defineConfig((env) => mergeConfigs( + vaadinConfig(env), + sharedConfig(env), + customConfig(env) +)); diff --git a/vaadin-notification-flow-parent/vaadin-notification-flow-integration-tests/vite.config.ts b/vaadin-notification-flow-parent/vaadin-notification-flow-integration-tests/vite.config.ts index 1c5b58b6990..bd0ce4ce0ae 100644 --- a/vaadin-notification-flow-parent/vaadin-notification-flow-integration-tests/vite.config.ts +++ b/vaadin-notification-flow-parent/vaadin-notification-flow-integration-tests/vite.config.ts @@ -1,27 +1,16 @@ // @ts-ignore can not be resolved until NPM packages are installed -import { UserConfigFn } from 'vite'; +import { defineConfig, UserConfigFn } from 'vite'; // @ts-ignore can not be resolved until Flow generates base Vite config -import { overrideVaadinConfig } from './vite.generated'; -// import { useLocalWebComponents } from '../../shared/web-components-vite-plugin'; -import { useLitWebComponents } from '../../shared/web-components-vite-plugin'; +import { vaadinConfig } from './vite.generated'; +import { sharedConfig, mergeConfigs } from '../../shared/shared-vite-config'; const customConfig: UserConfigFn = (env) => ({ // Here you can add custom Vite parameters // https://vitejs.dev/config/ - - // Use local version of web-components, disabled by default - // To use this un-comment the lines below and change the path to - // the absolute path of your web-components repo's node_modules - // folder - // DO NOT COMMIT THESE CHANGES! - /* - plugins: [ - useLocalWebComponents('/path/to/web-components/node_modules') - ] - */ - plugins: [ - useLitWebComponents() - ] }); -export default overrideVaadinConfig(customConfig); +export default defineConfig((env) => mergeConfigs( + vaadinConfig(env), + sharedConfig(env), + customConfig(env) +)); diff --git a/vaadin-ordered-layout-flow-parent/vaadin-ordered-layout-flow-integration-tests/vite.config.ts b/vaadin-ordered-layout-flow-parent/vaadin-ordered-layout-flow-integration-tests/vite.config.ts index 1c5b58b6990..bd0ce4ce0ae 100644 --- a/vaadin-ordered-layout-flow-parent/vaadin-ordered-layout-flow-integration-tests/vite.config.ts +++ b/vaadin-ordered-layout-flow-parent/vaadin-ordered-layout-flow-integration-tests/vite.config.ts @@ -1,27 +1,16 @@ // @ts-ignore can not be resolved until NPM packages are installed -import { UserConfigFn } from 'vite'; +import { defineConfig, UserConfigFn } from 'vite'; // @ts-ignore can not be resolved until Flow generates base Vite config -import { overrideVaadinConfig } from './vite.generated'; -// import { useLocalWebComponents } from '../../shared/web-components-vite-plugin'; -import { useLitWebComponents } from '../../shared/web-components-vite-plugin'; +import { vaadinConfig } from './vite.generated'; +import { sharedConfig, mergeConfigs } from '../../shared/shared-vite-config'; const customConfig: UserConfigFn = (env) => ({ // Here you can add custom Vite parameters // https://vitejs.dev/config/ - - // Use local version of web-components, disabled by default - // To use this un-comment the lines below and change the path to - // the absolute path of your web-components repo's node_modules - // folder - // DO NOT COMMIT THESE CHANGES! - /* - plugins: [ - useLocalWebComponents('/path/to/web-components/node_modules') - ] - */ - plugins: [ - useLitWebComponents() - ] }); -export default overrideVaadinConfig(customConfig); +export default defineConfig((env) => mergeConfigs( + vaadinConfig(env), + sharedConfig(env), + customConfig(env) +)); diff --git a/vaadin-popover-flow-parent/vaadin-popover-flow-integration-tests/vite.config.ts b/vaadin-popover-flow-parent/vaadin-popover-flow-integration-tests/vite.config.ts index 1c5b58b6990..bd0ce4ce0ae 100644 --- a/vaadin-popover-flow-parent/vaadin-popover-flow-integration-tests/vite.config.ts +++ b/vaadin-popover-flow-parent/vaadin-popover-flow-integration-tests/vite.config.ts @@ -1,27 +1,16 @@ // @ts-ignore can not be resolved until NPM packages are installed -import { UserConfigFn } from 'vite'; +import { defineConfig, UserConfigFn } from 'vite'; // @ts-ignore can not be resolved until Flow generates base Vite config -import { overrideVaadinConfig } from './vite.generated'; -// import { useLocalWebComponents } from '../../shared/web-components-vite-plugin'; -import { useLitWebComponents } from '../../shared/web-components-vite-plugin'; +import { vaadinConfig } from './vite.generated'; +import { sharedConfig, mergeConfigs } from '../../shared/shared-vite-config'; const customConfig: UserConfigFn = (env) => ({ // Here you can add custom Vite parameters // https://vitejs.dev/config/ - - // Use local version of web-components, disabled by default - // To use this un-comment the lines below and change the path to - // the absolute path of your web-components repo's node_modules - // folder - // DO NOT COMMIT THESE CHANGES! - /* - plugins: [ - useLocalWebComponents('/path/to/web-components/node_modules') - ] - */ - plugins: [ - useLitWebComponents() - ] }); -export default overrideVaadinConfig(customConfig); +export default defineConfig((env) => mergeConfigs( + vaadinConfig(env), + sharedConfig(env), + customConfig(env) +)); diff --git a/vaadin-progress-bar-flow-parent/vaadin-progress-bar-flow-integration-tests/vite.config.ts b/vaadin-progress-bar-flow-parent/vaadin-progress-bar-flow-integration-tests/vite.config.ts index 1c5b58b6990..bd0ce4ce0ae 100644 --- a/vaadin-progress-bar-flow-parent/vaadin-progress-bar-flow-integration-tests/vite.config.ts +++ b/vaadin-progress-bar-flow-parent/vaadin-progress-bar-flow-integration-tests/vite.config.ts @@ -1,27 +1,16 @@ // @ts-ignore can not be resolved until NPM packages are installed -import { UserConfigFn } from 'vite'; +import { defineConfig, UserConfigFn } from 'vite'; // @ts-ignore can not be resolved until Flow generates base Vite config -import { overrideVaadinConfig } from './vite.generated'; -// import { useLocalWebComponents } from '../../shared/web-components-vite-plugin'; -import { useLitWebComponents } from '../../shared/web-components-vite-plugin'; +import { vaadinConfig } from './vite.generated'; +import { sharedConfig, mergeConfigs } from '../../shared/shared-vite-config'; const customConfig: UserConfigFn = (env) => ({ // Here you can add custom Vite parameters // https://vitejs.dev/config/ - - // Use local version of web-components, disabled by default - // To use this un-comment the lines below and change the path to - // the absolute path of your web-components repo's node_modules - // folder - // DO NOT COMMIT THESE CHANGES! - /* - plugins: [ - useLocalWebComponents('/path/to/web-components/node_modules') - ] - */ - plugins: [ - useLitWebComponents() - ] }); -export default overrideVaadinConfig(customConfig); +export default defineConfig((env) => mergeConfigs( + vaadinConfig(env), + sharedConfig(env), + customConfig(env) +)); diff --git a/vaadin-radio-button-flow-parent/vaadin-radio-button-flow-integration-tests/vite.config.ts b/vaadin-radio-button-flow-parent/vaadin-radio-button-flow-integration-tests/vite.config.ts index 1c5b58b6990..bd0ce4ce0ae 100644 --- a/vaadin-radio-button-flow-parent/vaadin-radio-button-flow-integration-tests/vite.config.ts +++ b/vaadin-radio-button-flow-parent/vaadin-radio-button-flow-integration-tests/vite.config.ts @@ -1,27 +1,16 @@ // @ts-ignore can not be resolved until NPM packages are installed -import { UserConfigFn } from 'vite'; +import { defineConfig, UserConfigFn } from 'vite'; // @ts-ignore can not be resolved until Flow generates base Vite config -import { overrideVaadinConfig } from './vite.generated'; -// import { useLocalWebComponents } from '../../shared/web-components-vite-plugin'; -import { useLitWebComponents } from '../../shared/web-components-vite-plugin'; +import { vaadinConfig } from './vite.generated'; +import { sharedConfig, mergeConfigs } from '../../shared/shared-vite-config'; const customConfig: UserConfigFn = (env) => ({ // Here you can add custom Vite parameters // https://vitejs.dev/config/ - - // Use local version of web-components, disabled by default - // To use this un-comment the lines below and change the path to - // the absolute path of your web-components repo's node_modules - // folder - // DO NOT COMMIT THESE CHANGES! - /* - plugins: [ - useLocalWebComponents('/path/to/web-components/node_modules') - ] - */ - plugins: [ - useLitWebComponents() - ] }); -export default overrideVaadinConfig(customConfig); +export default defineConfig((env) => mergeConfigs( + vaadinConfig(env), + sharedConfig(env), + customConfig(env) +)); diff --git a/vaadin-renderer-flow-parent/vaadin-renderer-flow-integration-tests/vite.config.ts b/vaadin-renderer-flow-parent/vaadin-renderer-flow-integration-tests/vite.config.ts index 1c5b58b6990..bd0ce4ce0ae 100644 --- a/vaadin-renderer-flow-parent/vaadin-renderer-flow-integration-tests/vite.config.ts +++ b/vaadin-renderer-flow-parent/vaadin-renderer-flow-integration-tests/vite.config.ts @@ -1,27 +1,16 @@ // @ts-ignore can not be resolved until NPM packages are installed -import { UserConfigFn } from 'vite'; +import { defineConfig, UserConfigFn } from 'vite'; // @ts-ignore can not be resolved until Flow generates base Vite config -import { overrideVaadinConfig } from './vite.generated'; -// import { useLocalWebComponents } from '../../shared/web-components-vite-plugin'; -import { useLitWebComponents } from '../../shared/web-components-vite-plugin'; +import { vaadinConfig } from './vite.generated'; +import { sharedConfig, mergeConfigs } from '../../shared/shared-vite-config'; const customConfig: UserConfigFn = (env) => ({ // Here you can add custom Vite parameters // https://vitejs.dev/config/ - - // Use local version of web-components, disabled by default - // To use this un-comment the lines below and change the path to - // the absolute path of your web-components repo's node_modules - // folder - // DO NOT COMMIT THESE CHANGES! - /* - plugins: [ - useLocalWebComponents('/path/to/web-components/node_modules') - ] - */ - plugins: [ - useLitWebComponents() - ] }); -export default overrideVaadinConfig(customConfig); +export default defineConfig((env) => mergeConfigs( + vaadinConfig(env), + sharedConfig(env), + customConfig(env) +)); diff --git a/vaadin-rich-text-editor-flow-parent/vaadin-rich-text-editor-flow-integration-tests/vite.config.ts b/vaadin-rich-text-editor-flow-parent/vaadin-rich-text-editor-flow-integration-tests/vite.config.ts index 1c5b58b6990..bd0ce4ce0ae 100644 --- a/vaadin-rich-text-editor-flow-parent/vaadin-rich-text-editor-flow-integration-tests/vite.config.ts +++ b/vaadin-rich-text-editor-flow-parent/vaadin-rich-text-editor-flow-integration-tests/vite.config.ts @@ -1,27 +1,16 @@ // @ts-ignore can not be resolved until NPM packages are installed -import { UserConfigFn } from 'vite'; +import { defineConfig, UserConfigFn } from 'vite'; // @ts-ignore can not be resolved until Flow generates base Vite config -import { overrideVaadinConfig } from './vite.generated'; -// import { useLocalWebComponents } from '../../shared/web-components-vite-plugin'; -import { useLitWebComponents } from '../../shared/web-components-vite-plugin'; +import { vaadinConfig } from './vite.generated'; +import { sharedConfig, mergeConfigs } from '../../shared/shared-vite-config'; const customConfig: UserConfigFn = (env) => ({ // Here you can add custom Vite parameters // https://vitejs.dev/config/ - - // Use local version of web-components, disabled by default - // To use this un-comment the lines below and change the path to - // the absolute path of your web-components repo's node_modules - // folder - // DO NOT COMMIT THESE CHANGES! - /* - plugins: [ - useLocalWebComponents('/path/to/web-components/node_modules') - ] - */ - plugins: [ - useLitWebComponents() - ] }); -export default overrideVaadinConfig(customConfig); +export default defineConfig((env) => mergeConfigs( + vaadinConfig(env), + sharedConfig(env), + customConfig(env) +)); diff --git a/vaadin-select-flow-parent/vaadin-select-flow-integration-tests/vite.config.ts b/vaadin-select-flow-parent/vaadin-select-flow-integration-tests/vite.config.ts index 1c5b58b6990..bd0ce4ce0ae 100644 --- a/vaadin-select-flow-parent/vaadin-select-flow-integration-tests/vite.config.ts +++ b/vaadin-select-flow-parent/vaadin-select-flow-integration-tests/vite.config.ts @@ -1,27 +1,16 @@ // @ts-ignore can not be resolved until NPM packages are installed -import { UserConfigFn } from 'vite'; +import { defineConfig, UserConfigFn } from 'vite'; // @ts-ignore can not be resolved until Flow generates base Vite config -import { overrideVaadinConfig } from './vite.generated'; -// import { useLocalWebComponents } from '../../shared/web-components-vite-plugin'; -import { useLitWebComponents } from '../../shared/web-components-vite-plugin'; +import { vaadinConfig } from './vite.generated'; +import { sharedConfig, mergeConfigs } from '../../shared/shared-vite-config'; const customConfig: UserConfigFn = (env) => ({ // Here you can add custom Vite parameters // https://vitejs.dev/config/ - - // Use local version of web-components, disabled by default - // To use this un-comment the lines below and change the path to - // the absolute path of your web-components repo's node_modules - // folder - // DO NOT COMMIT THESE CHANGES! - /* - plugins: [ - useLocalWebComponents('/path/to/web-components/node_modules') - ] - */ - plugins: [ - useLitWebComponents() - ] }); -export default overrideVaadinConfig(customConfig); +export default defineConfig((env) => mergeConfigs( + vaadinConfig(env), + sharedConfig(env), + customConfig(env) +)); diff --git a/vaadin-side-nav-flow-parent/vaadin-side-nav-flow-integration-tests/vite.config.ts b/vaadin-side-nav-flow-parent/vaadin-side-nav-flow-integration-tests/vite.config.ts index 1c5b58b6990..bd0ce4ce0ae 100644 --- a/vaadin-side-nav-flow-parent/vaadin-side-nav-flow-integration-tests/vite.config.ts +++ b/vaadin-side-nav-flow-parent/vaadin-side-nav-flow-integration-tests/vite.config.ts @@ -1,27 +1,16 @@ // @ts-ignore can not be resolved until NPM packages are installed -import { UserConfigFn } from 'vite'; +import { defineConfig, UserConfigFn } from 'vite'; // @ts-ignore can not be resolved until Flow generates base Vite config -import { overrideVaadinConfig } from './vite.generated'; -// import { useLocalWebComponents } from '../../shared/web-components-vite-plugin'; -import { useLitWebComponents } from '../../shared/web-components-vite-plugin'; +import { vaadinConfig } from './vite.generated'; +import { sharedConfig, mergeConfigs } from '../../shared/shared-vite-config'; const customConfig: UserConfigFn = (env) => ({ // Here you can add custom Vite parameters // https://vitejs.dev/config/ - - // Use local version of web-components, disabled by default - // To use this un-comment the lines below and change the path to - // the absolute path of your web-components repo's node_modules - // folder - // DO NOT COMMIT THESE CHANGES! - /* - plugins: [ - useLocalWebComponents('/path/to/web-components/node_modules') - ] - */ - plugins: [ - useLitWebComponents() - ] }); -export default overrideVaadinConfig(customConfig); +export default defineConfig((env) => mergeConfigs( + vaadinConfig(env), + sharedConfig(env), + customConfig(env) +)); diff --git a/vaadin-split-layout-flow-parent/vaadin-split-layout-flow-integration-tests/vite.config.ts b/vaadin-split-layout-flow-parent/vaadin-split-layout-flow-integration-tests/vite.config.ts index 1c5b58b6990..bd0ce4ce0ae 100644 --- a/vaadin-split-layout-flow-parent/vaadin-split-layout-flow-integration-tests/vite.config.ts +++ b/vaadin-split-layout-flow-parent/vaadin-split-layout-flow-integration-tests/vite.config.ts @@ -1,27 +1,16 @@ // @ts-ignore can not be resolved until NPM packages are installed -import { UserConfigFn } from 'vite'; +import { defineConfig, UserConfigFn } from 'vite'; // @ts-ignore can not be resolved until Flow generates base Vite config -import { overrideVaadinConfig } from './vite.generated'; -// import { useLocalWebComponents } from '../../shared/web-components-vite-plugin'; -import { useLitWebComponents } from '../../shared/web-components-vite-plugin'; +import { vaadinConfig } from './vite.generated'; +import { sharedConfig, mergeConfigs } from '../../shared/shared-vite-config'; const customConfig: UserConfigFn = (env) => ({ // Here you can add custom Vite parameters // https://vitejs.dev/config/ - - // Use local version of web-components, disabled by default - // To use this un-comment the lines below and change the path to - // the absolute path of your web-components repo's node_modules - // folder - // DO NOT COMMIT THESE CHANGES! - /* - plugins: [ - useLocalWebComponents('/path/to/web-components/node_modules') - ] - */ - plugins: [ - useLitWebComponents() - ] }); -export default overrideVaadinConfig(customConfig); +export default defineConfig((env) => mergeConfigs( + vaadinConfig(env), + sharedConfig(env), + customConfig(env) +)); diff --git a/vaadin-spreadsheet-flow-parent/vaadin-spreadsheet-flow-integration-tests/vite.config.ts b/vaadin-spreadsheet-flow-parent/vaadin-spreadsheet-flow-integration-tests/vite.config.ts index 1c5b58b6990..bd0ce4ce0ae 100644 --- a/vaadin-spreadsheet-flow-parent/vaadin-spreadsheet-flow-integration-tests/vite.config.ts +++ b/vaadin-spreadsheet-flow-parent/vaadin-spreadsheet-flow-integration-tests/vite.config.ts @@ -1,27 +1,16 @@ // @ts-ignore can not be resolved until NPM packages are installed -import { UserConfigFn } from 'vite'; +import { defineConfig, UserConfigFn } from 'vite'; // @ts-ignore can not be resolved until Flow generates base Vite config -import { overrideVaadinConfig } from './vite.generated'; -// import { useLocalWebComponents } from '../../shared/web-components-vite-plugin'; -import { useLitWebComponents } from '../../shared/web-components-vite-plugin'; +import { vaadinConfig } from './vite.generated'; +import { sharedConfig, mergeConfigs } from '../../shared/shared-vite-config'; const customConfig: UserConfigFn = (env) => ({ // Here you can add custom Vite parameters // https://vitejs.dev/config/ - - // Use local version of web-components, disabled by default - // To use this un-comment the lines below and change the path to - // the absolute path of your web-components repo's node_modules - // folder - // DO NOT COMMIT THESE CHANGES! - /* - plugins: [ - useLocalWebComponents('/path/to/web-components/node_modules') - ] - */ - plugins: [ - useLitWebComponents() - ] }); -export default overrideVaadinConfig(customConfig); +export default defineConfig((env) => mergeConfigs( + vaadinConfig(env), + sharedConfig(env), + customConfig(env) +)); diff --git a/vaadin-tabs-flow-parent/vaadin-tabs-flow-integration-tests/vite.config.ts b/vaadin-tabs-flow-parent/vaadin-tabs-flow-integration-tests/vite.config.ts index 1c5b58b6990..bd0ce4ce0ae 100644 --- a/vaadin-tabs-flow-parent/vaadin-tabs-flow-integration-tests/vite.config.ts +++ b/vaadin-tabs-flow-parent/vaadin-tabs-flow-integration-tests/vite.config.ts @@ -1,27 +1,16 @@ // @ts-ignore can not be resolved until NPM packages are installed -import { UserConfigFn } from 'vite'; +import { defineConfig, UserConfigFn } from 'vite'; // @ts-ignore can not be resolved until Flow generates base Vite config -import { overrideVaadinConfig } from './vite.generated'; -// import { useLocalWebComponents } from '../../shared/web-components-vite-plugin'; -import { useLitWebComponents } from '../../shared/web-components-vite-plugin'; +import { vaadinConfig } from './vite.generated'; +import { sharedConfig, mergeConfigs } from '../../shared/shared-vite-config'; const customConfig: UserConfigFn = (env) => ({ // Here you can add custom Vite parameters // https://vitejs.dev/config/ - - // Use local version of web-components, disabled by default - // To use this un-comment the lines below and change the path to - // the absolute path of your web-components repo's node_modules - // folder - // DO NOT COMMIT THESE CHANGES! - /* - plugins: [ - useLocalWebComponents('/path/to/web-components/node_modules') - ] - */ - plugins: [ - useLitWebComponents() - ] }); -export default overrideVaadinConfig(customConfig); +export default defineConfig((env) => mergeConfigs( + vaadinConfig(env), + sharedConfig(env), + customConfig(env) +)); diff --git a/vaadin-text-field-flow-parent/vaadin-text-field-flow-integration-tests/vite.config.ts b/vaadin-text-field-flow-parent/vaadin-text-field-flow-integration-tests/vite.config.ts index 1c5b58b6990..bd0ce4ce0ae 100644 --- a/vaadin-text-field-flow-parent/vaadin-text-field-flow-integration-tests/vite.config.ts +++ b/vaadin-text-field-flow-parent/vaadin-text-field-flow-integration-tests/vite.config.ts @@ -1,27 +1,16 @@ // @ts-ignore can not be resolved until NPM packages are installed -import { UserConfigFn } from 'vite'; +import { defineConfig, UserConfigFn } from 'vite'; // @ts-ignore can not be resolved until Flow generates base Vite config -import { overrideVaadinConfig } from './vite.generated'; -// import { useLocalWebComponents } from '../../shared/web-components-vite-plugin'; -import { useLitWebComponents } from '../../shared/web-components-vite-plugin'; +import { vaadinConfig } from './vite.generated'; +import { sharedConfig, mergeConfigs } from '../../shared/shared-vite-config'; const customConfig: UserConfigFn = (env) => ({ // Here you can add custom Vite parameters // https://vitejs.dev/config/ - - // Use local version of web-components, disabled by default - // To use this un-comment the lines below and change the path to - // the absolute path of your web-components repo's node_modules - // folder - // DO NOT COMMIT THESE CHANGES! - /* - plugins: [ - useLocalWebComponents('/path/to/web-components/node_modules') - ] - */ - plugins: [ - useLitWebComponents() - ] }); -export default overrideVaadinConfig(customConfig); +export default defineConfig((env) => mergeConfigs( + vaadinConfig(env), + sharedConfig(env), + customConfig(env) +)); diff --git a/vaadin-time-picker-flow-parent/vaadin-time-picker-flow-integration-tests/vite.config.ts b/vaadin-time-picker-flow-parent/vaadin-time-picker-flow-integration-tests/vite.config.ts index 1c5b58b6990..bd0ce4ce0ae 100644 --- a/vaadin-time-picker-flow-parent/vaadin-time-picker-flow-integration-tests/vite.config.ts +++ b/vaadin-time-picker-flow-parent/vaadin-time-picker-flow-integration-tests/vite.config.ts @@ -1,27 +1,16 @@ // @ts-ignore can not be resolved until NPM packages are installed -import { UserConfigFn } from 'vite'; +import { defineConfig, UserConfigFn } from 'vite'; // @ts-ignore can not be resolved until Flow generates base Vite config -import { overrideVaadinConfig } from './vite.generated'; -// import { useLocalWebComponents } from '../../shared/web-components-vite-plugin'; -import { useLitWebComponents } from '../../shared/web-components-vite-plugin'; +import { vaadinConfig } from './vite.generated'; +import { sharedConfig, mergeConfigs } from '../../shared/shared-vite-config'; const customConfig: UserConfigFn = (env) => ({ // Here you can add custom Vite parameters // https://vitejs.dev/config/ - - // Use local version of web-components, disabled by default - // To use this un-comment the lines below and change the path to - // the absolute path of your web-components repo's node_modules - // folder - // DO NOT COMMIT THESE CHANGES! - /* - plugins: [ - useLocalWebComponents('/path/to/web-components/node_modules') - ] - */ - plugins: [ - useLitWebComponents() - ] }); -export default overrideVaadinConfig(customConfig); +export default defineConfig((env) => mergeConfigs( + vaadinConfig(env), + sharedConfig(env), + customConfig(env) +)); diff --git a/vaadin-upload-flow-parent/vaadin-upload-flow-integration-tests/vite.config.ts b/vaadin-upload-flow-parent/vaadin-upload-flow-integration-tests/vite.config.ts index 1c5b58b6990..bd0ce4ce0ae 100644 --- a/vaadin-upload-flow-parent/vaadin-upload-flow-integration-tests/vite.config.ts +++ b/vaadin-upload-flow-parent/vaadin-upload-flow-integration-tests/vite.config.ts @@ -1,27 +1,16 @@ // @ts-ignore can not be resolved until NPM packages are installed -import { UserConfigFn } from 'vite'; +import { defineConfig, UserConfigFn } from 'vite'; // @ts-ignore can not be resolved until Flow generates base Vite config -import { overrideVaadinConfig } from './vite.generated'; -// import { useLocalWebComponents } from '../../shared/web-components-vite-plugin'; -import { useLitWebComponents } from '../../shared/web-components-vite-plugin'; +import { vaadinConfig } from './vite.generated'; +import { sharedConfig, mergeConfigs } from '../../shared/shared-vite-config'; const customConfig: UserConfigFn = (env) => ({ // Here you can add custom Vite parameters // https://vitejs.dev/config/ - - // Use local version of web-components, disabled by default - // To use this un-comment the lines below and change the path to - // the absolute path of your web-components repo's node_modules - // folder - // DO NOT COMMIT THESE CHANGES! - /* - plugins: [ - useLocalWebComponents('/path/to/web-components/node_modules') - ] - */ - plugins: [ - useLitWebComponents() - ] }); -export default overrideVaadinConfig(customConfig); +export default defineConfig((env) => mergeConfigs( + vaadinConfig(env), + sharedConfig(env), + customConfig(env) +)); diff --git a/vaadin-virtual-list-flow-parent/vaadin-virtual-list-flow-integration-tests/vite.config.ts b/vaadin-virtual-list-flow-parent/vaadin-virtual-list-flow-integration-tests/vite.config.ts index 1c5b58b6990..bd0ce4ce0ae 100644 --- a/vaadin-virtual-list-flow-parent/vaadin-virtual-list-flow-integration-tests/vite.config.ts +++ b/vaadin-virtual-list-flow-parent/vaadin-virtual-list-flow-integration-tests/vite.config.ts @@ -1,27 +1,16 @@ // @ts-ignore can not be resolved until NPM packages are installed -import { UserConfigFn } from 'vite'; +import { defineConfig, UserConfigFn } from 'vite'; // @ts-ignore can not be resolved until Flow generates base Vite config -import { overrideVaadinConfig } from './vite.generated'; -// import { useLocalWebComponents } from '../../shared/web-components-vite-plugin'; -import { useLitWebComponents } from '../../shared/web-components-vite-plugin'; +import { vaadinConfig } from './vite.generated'; +import { sharedConfig, mergeConfigs } from '../../shared/shared-vite-config'; const customConfig: UserConfigFn = (env) => ({ // Here you can add custom Vite parameters // https://vitejs.dev/config/ - - // Use local version of web-components, disabled by default - // To use this un-comment the lines below and change the path to - // the absolute path of your web-components repo's node_modules - // folder - // DO NOT COMMIT THESE CHANGES! - /* - plugins: [ - useLocalWebComponents('/path/to/web-components/node_modules') - ] - */ - plugins: [ - useLitWebComponents() - ] }); -export default overrideVaadinConfig(customConfig); +export default defineConfig((env) => mergeConfigs( + vaadinConfig(env), + sharedConfig(env), + customConfig(env) +));