summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/astro/src/core/config/vite-load.ts4
-rw-r--r--packages/astro/src/vite-plugin-load-fallback/index.ts5
-rw-r--r--packages/astro/test/units/config/format.test.js11
3 files changed, 10 insertions, 10 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) {
diff --git a/packages/astro/test/units/config/format.test.js b/packages/astro/test/units/config/format.test.js
index d3ace2672..175ea9f04 100644
--- a/packages/astro/test/units/config/format.test.js
+++ b/packages/astro/test/units/config/format.test.js
@@ -2,9 +2,7 @@ import { expect } from 'chai';
import * as cheerio from 'cheerio';
import { fileURLToPath } from 'url';
-import {
- runInContainer,
-} from '../../../dist/core/dev/index.js';
+import { runInContainer } from '../../../dist/core/dev/index.js';
import { openConfig, createSettings } from '../../../dist/core/config/index.js';
import { createFs } from '../test-utils.js';
import { defaultLogging } from '../../test-utils.js';
@@ -30,12 +28,15 @@ describe('Astro config formats', () => {
flags: {},
cmd: 'dev',
logging: defaultLogging,
- fsMod: fs
+ fsMod: fs,
});
const settings = createSettings(astroConfig);
await runInContainer({ fs, root, settings }, () => {
- expect(true).to.equal(true, 'We were able to get into the container which means the config loaded.');
+ expect(true).to.equal(
+ true,
+ 'We were able to get into the container which means the config loaded.'
+ );
});
});
});