Skip to content

Commit

Permalink
[ci] format
Browse files Browse the repository at this point in the history
  • Loading branch information
natemoo-re authored and astrobot-houston committed Jul 21, 2022
1 parent 48011cb commit 3f7b5f1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/astro/src/core/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,10 @@ export function createCustomViteLogger(logLevel: LogLevel): Logger {
function generateHint(err: ErrorWithMetadata, filePath?: URL): string | undefined {
if (/Unknown file extension \"\.(jsx|vue|svelte|astro|css)\" for /.test(err.message)) {
return 'You likely need to add this package to `vite.ssr.noExternal` in your astro config file.';
} else if (err.toString().startsWith('ReferenceError') && (err.loc?.file ?? filePath?.pathname)?.endsWith('.astro')) {
} else if (
err.toString().startsWith('ReferenceError') &&
(err.loc?.file ?? filePath?.pathname)?.endsWith('.astro')
) {
return 'export statements in `.astro` files do not have access to local variable declarations, only imported values.';
} else {
const res = incompatPackageExp.exec(err.stack);
Expand Down

0 comments on commit 3f7b5f1

Please sign in to comment.