diff --git a/packages/astro/src/vite-plugin-astro/compile.ts b/packages/astro/src/vite-plugin-astro/compile.ts index 356d602de..5a6e199d7 100644 --- a/packages/astro/src/vite-plugin-astro/compile.ts +++ b/packages/astro/src/vite-plugin-astro/compile.ts @@ -63,7 +63,9 @@ async function compile({ // For Windows compat, prepend the module ID with `/@fs` pathname: `/@fs${prependForwardSlash(moduleId)}`, projectRoot: config.root.toString(), - site: config.site ? new URL(config.base, config.site).toString() : `http://localhost:${config.server.port}/`, + site: config.site + ? new URL(config.base, config.site).toString() + : `http://localhost:${config.server.port}/`, sourcefile: filename, sourcemap: 'both', internalURL: `/@fs${prependForwardSlash( diff --git a/packages/astro/src/vite-plugin-markdown/index.ts b/packages/astro/src/vite-plugin-markdown/index.ts index f64250bdd..1a0b9f228 100644 --- a/packages/astro/src/vite-plugin-markdown/index.ts +++ b/packages/astro/src/vite-plugin-markdown/index.ts @@ -165,7 +165,9 @@ ${setup}`.trim(); let { code: tsResult } = await transform(astroResult, { pathname: '/@fs' + prependForwardSlash(fileUrl.pathname), projectRoot: config.root.toString(), - site: config.site ? new URL(config.base, config.site).toString() : `http://localhost:${config.server.port}/`, + site: config.site + ? new URL(config.base, config.site).toString() + : `http://localhost:${config.server.port}/`, sourcefile: id, sourcemap: 'inline', // TODO: baseline flag diff --git a/packages/astro/test/astro-global.test.js b/packages/astro/test/astro-global.test.js index 5a26270a0..a68ae039f 100644 --- a/packages/astro/test/astro-global.test.js +++ b/packages/astro/test/astro-global.test.js @@ -9,7 +9,7 @@ describe('Astro Global', () => { fixture = await loadFixture({ root: './fixtures/astro-global/', site: 'https://mysite.dev/', - base: '/blog' + base: '/blog', }); }); @@ -93,7 +93,7 @@ describe('Astro Global Defaults', () => { before(async () => { fixture = await loadFixture({ - root: './fixtures/astro-global/' + root: './fixtures/astro-global/', }); });