]> git.ipfire.org Git - thirdparty/vuejs/create-vue.git/commitdiff
fix: correctly set the package name value (#699)
authorbtea <2356281422@qq.com>
Fri, 28 Feb 2025 10:07:02 +0000 (18:07 +0800)
committerGitHub <noreply@github.com>
Fri, 28 Feb 2025 10:07:02 +0000 (18:07 +0800)
index.ts

index 744a66702232e2daefe6c87696ca40b67f3047a6..44ca81c469668a84f2c35bc35eee1ff72a00bb54 100755 (executable)
--- a/index.ts
+++ b/index.ts
@@ -386,7 +386,7 @@ async function init() {
   // so we still have to assign the default values here
   const {
     projectName,
-    packageName = projectName ?? defaultProjectName,
+    packageName = projectName.trim() || defaultProjectName,
     shouldOverwrite = argv.force as boolean,
     needsJsx = argv.jsx as boolean,
     needsTypeScript = (argv.ts || argv.typescript) as boolean,