Commit a7c8c67c8360fdafff831449a6ef8c755f2a359b
Committed by
GitHub
1 parent
ae3f8329
chore: typo (#584)
* fix: 变量名错误 * fix: 修复正则可以匹配纯数字问题
Showing
2 changed files
with
3 additions
and
3 deletions
build/vite/plugin/styleImport.ts
... | ... | @@ -7,7 +7,7 @@ import styleImport from 'vite-plugin-style-import'; |
7 | 7 | |
8 | 8 | export function configStyleImportPlugin(isBuild: boolean) { |
9 | 9 | if (!isBuild) return []; |
10 | - const pwaPlugin = styleImport({ | |
10 | + const styleImportPlugin = styleImport({ | |
11 | 11 | libs: [ |
12 | 12 | { |
13 | 13 | libraryName: 'ant-design-vue', |
... | ... | @@ -18,5 +18,5 @@ export function configStyleImportPlugin(isBuild: boolean) { |
18 | 18 | }, |
19 | 19 | ], |
20 | 20 | }); |
21 | - return pwaPlugin; | |
21 | + return styleImportPlugin; | |
22 | 22 | } | ... | ... |
src/utils/env.ts
... | ... | @@ -30,7 +30,7 @@ export function getAppEnvConfig() { |
30 | 30 | VITE_GLOB_UPLOAD_URL, |
31 | 31 | } = ENV; |
32 | 32 | |
33 | - if (!/[a-zA-Z\_]*/.test(VITE_GLOB_APP_SHORT_NAME)) { | |
33 | + if (!/^[a-zA-Z\_]*$/.test(VITE_GLOB_APP_SHORT_NAME)) { | |
34 | 34 | warn( |
35 | 35 | `VITE_GLOB_APP_SHORT_NAME Variables can only be characters/underscores, please modify in the environment variables and re-running.` |
36 | 36 | ); | ... | ... |