fix: do not override snowpack alias (#610)
This commit is contained in:
parent
5d5d67c8f9
commit
20b4a600f5
2 changed files with 7 additions and 2 deletions
5
.changeset/metal-lions-try.md
Normal file
5
.changeset/metal-lions-try.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'astro': patch
|
||||
---
|
||||
|
||||
Bugfix: do not override user `alias` passed into snowpack config
|
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue