summaryrefslogtreecommitdiff
path: root/packages/astro/src
diff options
context:
space:
mode:
Diffstat (limited to 'packages/astro/src')
-rw-r--r--packages/astro/src/core/config/vite-load.ts4
-rw-r--r--packages/astro/src/vite-plugin-load-fallback/index.ts5
2 files changed, 4 insertions, 5 deletions
diff --git a/packages/astro/src/core/config/vite-load.ts b/packages/astro/src/core/config/vite-load.ts
index a864c784f..97ae63079 100644
--- a/packages/astro/src/core/config/vite-load.ts
+++ b/packages/astro/src/core/config/vite-load.ts
@@ -2,8 +2,8 @@ import type fsType from 'fs';
import npath from 'path';
import { pathToFileURL } from 'url';
import * as vite from 'vite';
-import { AstroError, AstroErrorData } from '../errors/index.js';
import loadFallbackPlugin from '../../vite-plugin-load-fallback/index.js';
+import { AstroError, AstroErrorData } from '../errors/index.js';
// Fallback for legacy
import load from '@proload/core';
@@ -28,7 +28,7 @@ async function createViteLoader(root: string, fs: typeof fsType): Promise<ViteLo
// avoid `vite.createServer` and use `loadConfigFromFile` instead.
external: ['@astrojs/tailwind', '@astrojs/mdx', '@astrojs/react'],
},
- plugins: [ loadFallbackPlugin({ fs, root: pathToFileURL(root) })]
+ plugins: [loadFallbackPlugin({ fs, root: pathToFileURL(root) })],
});
return {
diff --git a/packages/astro/src/vite-plugin-load-fallback/index.ts b/packages/astro/src/vite-plugin-load-fallback/index.ts
index 6a37af223..76ca4e2bd 100644
--- a/packages/astro/src/vite-plugin-load-fallback/index.ts
+++ b/packages/astro/src/vite-plugin-load-fallback/index.ts
@@ -2,7 +2,6 @@ import nodeFs from 'fs';
import npath from 'path';
import slashify from 'slash';
import type * as vite from 'vite';
-import type { AstroSettings } from '../@types/astro';
type NodeFileSystemModule = typeof nodeFs;
@@ -49,11 +48,11 @@ export default function loadFallbackPlugin({
try {
// Check to see if this file exists and is not a directory.
const stats = await fs.promises.stat(candidateId);
- if(!stats.isDirectory()) {
+ if (!stats.isDirectory()) {
return candidateId;
}
} catch {}
- }
+ }
let resolved = await this.resolve(id, parent, { skipSelf: true });
if (resolved) {