mirror of
https://github.com/alex8088/electron-vite.git
synced 2025-04-23 18:00:26 +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 resolvedPath: string
|
||||||
let isESM = false
|
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}.`)
|
throw new Error(`config file cannot be named ${configFile}.`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user