diff --git a/flow-server/src/main/resources/vite.generated.ts b/flow-server/src/main/resources/vite.generated.ts index 05fa761b591..9bcfebed8c2 100644 --- a/flow-server/src/main/resources/vite.generated.ts +++ b/flow-server/src/main/resources/vite.generated.ts @@ -686,7 +686,12 @@ export const vaadinConfig: UserConfigFn = (env) => { // exposes the compiler API to Node, so the checker falls back to // running tsc as a separate process and resolves the config // strictly against this root without searching parent folders. - root: __dirname + // The root is relative because the checker passes it to tsc as + // "-p " in a command line that is split on spaces, which + // would break for a project directory containing a space. Vite is + // always spawned with the project root as its working directory, + // which is this directory, so "." resolves to the same tsconfig. + root: '.' } }), productionMode && visualizer({ brotliSize: true, filename: bundleSizeFile })