Commit 9f6822991c4b2da78e0a5d0c7d6e0288f0d9d1cb
1 parent
56a966cf
fix: name of vite `mode` support more characters
修复vite模式名称不支持下划线的问题 fixed: #1115
Showing
2 changed files
with
2 additions
and
1 deletions
CHANGELOG.zh_CN.md
build/utils.ts
... | ... | @@ -50,7 +50,7 @@ export function wrapperEnv(envConf: Recordable): ViteEnv { |
50 | 50 | */ |
51 | 51 | function getConfFiles() { |
52 | 52 | const script = process.env.npm_lifecycle_script; |
53 | - const reg = new RegExp('--mode ([a-z]+)'); | |
53 | + const reg = new RegExp('--mode ([a-z_\\d]+)'); | |
54 | 54 | const result = reg.exec(script as string) as any; |
55 | 55 | if (result) { |
56 | 56 | const mode = result[1] as string; | ... | ... |