diff options
author | 2022-12-19 19:07:00 +0100 | |
---|---|---|
committer | 2022-12-19 15:07:00 -0300 | |
commit | a467139e169ad2eb7931e03004f1d658f7362e59 (patch) | |
tree | bd3bfded4340fc12a3daf41fce89fbc4822476fb | |
parent | 783a2a8e1bf3854b384e78fee7808777bfdfb501 (diff) | |
download | astro-a467139e169ad2eb7931e03004f1d658f7362e59.tar.gz astro-a467139e169ad2eb7931e03004f1d658f7362e59.tar.zst astro-a467139e169ad2eb7931e03004f1d658f7362e59.zip |
fix traced warnings from unexpected token (#5638)
* fix traced warnings from unexpected token
* Fixed styling
-rw-r--r-- | .changeset/lazy-tomatoes-call.md | 5 | ||||
-rw-r--r-- | packages/integrations/vercel/src/lib/nft.ts | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/.changeset/lazy-tomatoes-call.md b/.changeset/lazy-tomatoes-call.md new file mode 100644 index 000000000..e36f95d01 --- /dev/null +++ b/.changeset/lazy-tomatoes-call.md @@ -0,0 +1,5 @@ +--- +'@astrojs/vercel': minor +--- + +Ignore warnings when traced file fails to parse diff --git a/packages/integrations/vercel/src/lib/nft.ts b/packages/integrations/vercel/src/lib/nft.ts index 6a9ac116e..46604db90 100644 --- a/packages/integrations/vercel/src/lib/nft.ts +++ b/packages/integrations/vercel/src/lib/nft.ts @@ -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; } |