Commit a7c8c67c8360fdafff831449a6ef8c755f2a359b

Authored by 江麻妞
Committed by GitHub
1 parent ae3f8329

chore: typo (#584)

* fix: 变量名错误

* fix: 修复正则可以匹配纯数字问题
build/vite/plugin/styleImport.ts
@@ -7,7 +7,7 @@ import styleImport from 'vite-plugin-style-import'; @@ -7,7 +7,7 @@ import styleImport from 'vite-plugin-style-import';
7 7
8 export function configStyleImportPlugin(isBuild: boolean) { 8 export function configStyleImportPlugin(isBuild: boolean) {
9 if (!isBuild) return []; 9 if (!isBuild) return [];
10 - const pwaPlugin = styleImport({ 10 + const styleImportPlugin = styleImport({
11 libs: [ 11 libs: [
12 { 12 {
13 libraryName: 'ant-design-vue', 13 libraryName: 'ant-design-vue',
@@ -18,5 +18,5 @@ export function configStyleImportPlugin(isBuild: boolean) { @@ -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,7 +30,7 @@ export function getAppEnvConfig() {
30 VITE_GLOB_UPLOAD_URL, 30 VITE_GLOB_UPLOAD_URL,
31 } = ENV; 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 warn( 34 warn(
35 `VITE_GLOB_APP_SHORT_NAME Variables can only be characters/underscores, please modify in the environment variables and re-running.` 35 `VITE_GLOB_APP_SHORT_NAME Variables can only be characters/underscores, please modify in the environment variables and re-running.`
36 ); 36 );