[ci] format
This commit is contained in:
parent
48011cbcf8
commit
3f7b5f155e
1 changed files with 4 additions and 1 deletions
|
@ -88,7 +88,10 @@ export function createCustomViteLogger(logLevel: LogLevel): Logger {
|
||||||
function generateHint(err: ErrorWithMetadata, filePath?: URL): string | undefined {
|
function generateHint(err: ErrorWithMetadata, filePath?: URL): string | undefined {
|
||||||
if (/Unknown file extension \"\.(jsx|vue|svelte|astro|css)\" for /.test(err.message)) {
|
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.';
|
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.';
|
return 'export statements in `.astro` files do not have access to local variable declarations, only imported values.';
|
||||||
} else {
|
} else {
|
||||||
const res = incompatPackageExp.exec(err.stack);
|
const res = incompatPackageExp.exec(err.stack);
|
||||||
|
|
Loading…
Reference in a new issue