diff --git a/webapp/packages/product-default/vite.config.ts b/webapp/packages/product-default/vite.config.ts index 007a226893..7abf0f5b75 100644 --- a/webapp/packages/product-default/vite.config.ts +++ b/webapp/packages/product-default/vite.config.ts @@ -1,6 +1,6 @@ /* * CloudBeaver - Cloud Database Manager - * Copyright (C) 2020-2024 DBeaver Corp and others + * Copyright (C) 2020-2025 DBeaver Corp and others * * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. @@ -14,6 +14,10 @@ import packageJson from './package.json'; export default defineConfig( ({ mode }): UserConfig => ({ + /* + Fixes https://github.com/dbeaver/cloudbeaver/issues/3308 + ROOT_URI approach for assets doesn't work well when we serve our application not from a root folder. In that case inner Vite asset handling system add indices to CSS files using absolute path ignoring injected ROOT_URI. When using relative path in base property, we ask Vite to generate paths relatively to each file https://vite.dev/guide/build#public-base-path. */ + base: './', plugins: [baseConfigurationPlugin(mode, packageJson)], }), );