From 9004a68e2b7f67716d8a484c782835be173ce21b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Wouts?= Date: Mon, 23 Oct 2023 00:11:40 +1100 Subject: [PATCH] add back --- core/src/vite/vite-manager.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/src/vite/vite-manager.ts b/core/src/vite/vite-manager.ts index 456010937cc..c16bb2aad8c 100644 --- a/core/src/vite/vite-manager.ts +++ b/core/src/vite/vite-manager.ts @@ -248,6 +248,9 @@ export class ViteManager { }; this.options.reader.listeners.add(this.#readerListener); try { + // PostCSS requires the current directory to change because it relies + // on the `import-cwd` package to resolve plugins. + process.chdir(this.options.rootDir); const configFromProject = await readConfig( this.options.rootDir, viteLogLevelFromPinoLogger(this.options.logger)