mirror of
https://github.com/withastro/astro.git
synced 2025-02-10 22:38:53 -05:00
fix: vite warning on load-astro-config
This commit is contained in:
parent
8ea2c8778d
commit
d7b76b9638
1 changed files with 3 additions and 1 deletions
|
@ -45,7 +45,9 @@ function search(root: string) {
|
|||
async function loadConfigWithVite(configPath: string): Promise<Record<string, unknown>> {
|
||||
if (/\.[cm]?js$/.test(configPath)) {
|
||||
try {
|
||||
const config = await import(pathToFileURL(configPath).toString() + '?t=' + Date.now());
|
||||
const config = await import(
|
||||
/* @vite-ignore */ pathToFileURL(configPath).toString() + '?t=' + Date.now()
|
||||
);
|
||||
return config.default ?? {};
|
||||
} catch (e) {
|
||||
// We do not need to throw the error here as we have a Vite fallback below
|
||||
|
|
Loading…
Add table
Reference in a new issue