audit file urls (#2853)
This commit is contained in:
parent
1cab405460
commit
8ec3d0da19
3 changed files with 4 additions and 4 deletions
|
@ -7,7 +7,7 @@ import type { ViteConfigWithSSR } from '../create-vite.js';
|
|||
import { fileURLToPath } from 'url';
|
||||
import * as vite from 'vite';
|
||||
import { createBuildInternals } from '../../core/build/internal.js';
|
||||
import { rollupPluginAstroBuildHTML } from '../../vite-plugin-build-html/index.js';
|
||||
import { rollupPluginAstroScanHTML } from '../../vite-plugin-build-html/index.js';
|
||||
import { rollupPluginAstroBuildCSS } from '../../vite-plugin-build-css/index.js';
|
||||
import { RouteCache } from '../render/route-cache.js';
|
||||
|
||||
|
@ -63,7 +63,7 @@ export async function build(opts: ScanBasedBuildOptions) {
|
|||
target: 'es2020', // must match an esbuild target
|
||||
},
|
||||
plugins: [
|
||||
rollupPluginAstroBuildHTML({
|
||||
rollupPluginAstroScanHTML({
|
||||
astroConfig,
|
||||
internals,
|
||||
logging,
|
||||
|
|
|
@ -273,7 +273,7 @@ export async function loadConfig(configOptions: LoadConfigOptions): Promise<Astr
|
|||
|
||||
if (flags?.config) {
|
||||
userConfigPath = /^\.*\//.test(flags.config) ? flags.config : `./${flags.config}`;
|
||||
userConfigPath = fileURLToPath(new URL(userConfigPath, `file://${root}/`));
|
||||
userConfigPath = fileURLToPath(new URL(userConfigPath, pathToFileURL(root)));
|
||||
}
|
||||
// Automatically load config file using Proload
|
||||
// If `userConfigPath` is `undefined`, Proload will search for `astro.config.[cm]?[jt]s`
|
||||
|
|
|
@ -43,7 +43,7 @@ function relativePath(from: string, to: string): string {
|
|||
return prependDotSlash(rel);
|
||||
}
|
||||
|
||||
export function rollupPluginAstroBuildHTML(options: PluginOptions): VitePlugin {
|
||||
export function rollupPluginAstroScanHTML(options: PluginOptions): VitePlugin {
|
||||
const { astroConfig, internals, logging, origin, allPages, routeCache, viteServer, pageNames } = options;
|
||||
|
||||
// The filepath root of the src folder
|
||||
|
|
Loading…
Reference in a new issue