0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-23 21:53:55 -05:00

fix traced warnings from unexpected token (#5638)

* fix traced warnings from unexpected token

* Fixed styling
This commit is contained in:
Andrea De Masi 2022-12-19 19:07:00 +01:00 committed by GitHub
parent 783a2a8e1b
commit a467139e16
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View file

@ -0,0 +1,5 @@
---
'@astrojs/vercel': minor
---
Ignore warnings when traced file fails to parse

View file

@ -43,6 +43,12 @@ export async function copyDependenciesToFunction({
`[@astrojs/vercel] The module "${module}" inside the file "${file}" couldn't be resolved. This may not be a problem, but it's worth checking.`
);
}
}
// parse errors are likely not js and can safely be ignored,
// such as this html file in "main" meant for nw instead of node:
// https://github.com/vercel/nft/issues/311
else if (error.message.startsWith('Failed to parse')) {
continue;
} else {
throw error;
}