diff --git a/src/config.ts b/src/config.ts index 489cde9..53b2959 100644 --- a/src/config.ts +++ b/src/config.ts @@ -209,7 +209,7 @@ export async function loadConfigFromFile( let resolvedPath: string let isESM = false - if (configFile && /^vite.config.(js)|(ts)|(mjs)|(cjs)$/.test(configFile)) { + if (configFile && /^vite.config.(js|ts|mjs|cjs)$/.test(configFile)) { throw new Error(`config file cannot be named ${configFile}.`) }