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:
parent
783a2a8e1b
commit
a467139e16
2 changed files with 11 additions and 0 deletions
5
.changeset/lazy-tomatoes-call.md
Normal file
5
.changeset/lazy-tomatoes-call.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
'@astrojs/vercel': minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Ignore warnings when traced file fails to parse
|
|
@ -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.`
|
`[@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 {
|
} else {
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue