From 556fe95f20d6f0d3a8da332b0a76db4c49970ac8 Mon Sep 17 00:00:00 2001 From: alex8088 <244096523@qq.com> Date: Mon, 19 Sep 2022 18:32:39 +0800 Subject: [PATCH] fix: specify a config file error --- src/config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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}.`) }