diff --git a/.changeset/metal-lions-try.md b/.changeset/metal-lions-try.md new file mode 100644 index 000000000..c70a2f872 --- /dev/null +++ b/.changeset/metal-lions-try.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Bugfix: do not override user `alias` passed into snowpack config diff --git a/packages/astro/src/runtime.ts b/packages/astro/src/runtime.ts index a12f5d4fe..a8a322f84 100644 --- a/packages/astro/src/runtime.ts +++ b/packages/astro/src/runtime.ts @@ -422,8 +422,8 @@ async function createSnowpack(astroConfig: AstroConfig, options: CreateSnowpackO }); const polyfillNode = (snowpackConfig.packageOptions as any).polyfillNode as boolean; - if(!polyfillNode) { - snowpackConfig.alias = Object.fromEntries(nodeBuiltinsMap); + if (!polyfillNode) { + snowpackConfig.alias = Object.assign({}, Object.fromEntries(nodeBuiltinsMap), snowpackConfig.alias ?? {}); } snowpack = await startSnowpackServer(