mirror of
https://github.com/alex8088/electron-vite.git
synced 2025-04-06 04:05:44 +08:00
fix: specify a config file error
This commit is contained in:
parent
da50aa9246
commit
556fe95f20
@ -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}.`)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user