0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-23 21:53:55 -05:00

[ci] yarn format

This commit is contained in:
matthewp 2022-02-15 21:56:06 +00:00 committed by GitHub Actions
parent ec6f148fc8
commit 911b15588e
2 changed files with 4 additions and 4 deletions

View file

@ -50,12 +50,12 @@ export default function astro({ config, logging }: AstroPluginOptions): vite.Plu
async resolveId(id, from) { async resolveId(id, from) {
// If resolving from an astro subresource such as a hoisted script, // If resolving from an astro subresource such as a hoisted script,
// we need to resolve relative paths ourselves. // we need to resolve relative paths ourselves.
if(from) { if (from) {
const { query: fromQuery, filename } = parseAstroRequest(from); const { query: fromQuery, filename } = parseAstroRequest(from);
if(fromQuery.astro && isRelativePath(id)) { if (fromQuery.astro && isRelativePath(id)) {
const resolvedURL = new URL(id, `file://${filename}`); const resolvedURL = new URL(id, `file://${filename}`);
const resolved = resolvedURL.pathname; const resolved = resolvedURL.pathname;
if(isBrowserPath(resolved)) { if (isBrowserPath(resolved)) {
return slash(fileURLToPath(new URL('.' + resolved, config.projectRoot))); return slash(fileURLToPath(new URL('.' + resolved, config.projectRoot)));
} }
return slash(fileURLToPath(resolvedURL)); return slash(fileURLToPath(resolvedURL));

View file

@ -2,7 +2,7 @@ import { expect } from 'chai';
import cheerio from 'cheerio'; import cheerio from 'cheerio';
import { loadFixture } from './test-utils.js'; import { loadFixture } from './test-utils.js';
describe('LitElement test', function() { describe('LitElement test', function () {
this.timeout(30000); this.timeout(30000);
let fixture; let fixture;