From a7151a19bd61d423e43c9a0624e96755640aca3a Mon Sep 17 00:00:00 2001 From: Rom Date: Fri, 20 Sep 2024 11:14:06 +0200 Subject: [PATCH] fix: fix config import resolving + make passToClient env server-only (fix #1882) (#1886) --- .../v1-design/getVikeConfig/configDefinitionsBuiltIn.ts | 2 +- .../v1-design/getVikeConfig/transpileAndExecuteFile.ts | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/vike/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/configDefinitionsBuiltIn.ts b/vike/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/configDefinitionsBuiltIn.ts index 7e9d4db1ee4..e20951ab146 100644 --- a/vike/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/configDefinitionsBuiltIn.ts +++ b/vike/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/configDefinitionsBuiltIn.ts @@ -117,7 +117,7 @@ const configDefinitionsBuiltIn: ConfigDefinitionsBuiltIn = { env: { server: true, client: true } }, passToClient: { - env: { server: true, config: true }, + env: { server: true }, cumulative: true }, route: { diff --git a/vike/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/transpileAndExecuteFile.ts b/vike/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/transpileAndExecuteFile.ts index a396f6db089..f9c02432308 100644 --- a/vike/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/transpileAndExecuteFile.ts +++ b/vike/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/transpileAndExecuteFile.ts @@ -235,11 +235,10 @@ async function transpileWithEsbuild( if (debug.isActivated) debug('onResolved()', { args, resolved, importPathTranspiled, isPointerImport, isExternal }) - pointerImports[importPathTranspiled] = isPointerImport if (isExternal) { + pointerImports[importPathTranspiled] = isPointerImport return { external: true, path: importPathTranspiled } } else { - resolved.path = importPathTranspiled return resolved } })