mirror of
https://github.com/withastro/astro.git
synced 2025-02-17 22:44:24 -05:00
[ci] format
This commit is contained in:
parent
546d92c862
commit
4137927e3c
2 changed files with 3 additions and 4 deletions
|
@ -4,10 +4,10 @@ export default function vitePluginFileURL({}): VitePlugin {
|
||||||
return {
|
return {
|
||||||
name: 'astro:vite-plugin-file-url',
|
name: 'astro:vite-plugin-file-url',
|
||||||
resolveId(source, importer) {
|
resolveId(source, importer) {
|
||||||
if(source.startsWith('file://')) {
|
if (source.startsWith('file://')) {
|
||||||
const rest = source.slice(7);
|
const rest = source.slice(7);
|
||||||
return this.resolve(rest, importer);
|
return this.resolve(rest, importer);
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -158,7 +158,6 @@ describe('Astro basics', () => {
|
||||||
expect(content2).to.be.ok;
|
expect(content2).to.be.ok;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
it('allows file:// urls as module specifiers', async () => {
|
it('allows file:// urls as module specifiers', async () => {
|
||||||
const html = await fixture.readFile('/fileurl/index.html');
|
const html = await fixture.readFile('/fileurl/index.html');
|
||||||
const $ = cheerio.load(html);
|
const $ = cheerio.load(html);
|
||||||
|
|
Loading…
Add table
Reference in a new issue