]> git.ipfire.org Git - thirdparty/vuejs/create-vue.git/commitdiff
fix: fix packageName when npm init vue set valid targetDir (#51)
authorchenpeng991105 <chenpeng991105@foxmail.com>
Fri, 11 Feb 2022 08:08:08 +0000 (16:08 +0800)
committerGitHub <noreply@github.com>
Fri, 11 Feb 2022 08:08:08 +0000 (16:08 +0800)
index.js

index eb766ff34cd5ff47eb1cce858203975150e04bbe..a06e9a16d4cce812c5b28fcb4465a84cb7fadc4f 100755 (executable)
--- a/index.js
+++ b/index.js
@@ -227,7 +227,7 @@ async function init() {
   // so we still have to assign the default values here
   const {
     projectName,
-    packageName = projectName,
+    packageName = projectName || defaultProjectName,
     shouldOverwrite = argv.force,
     needsJsx = argv.jsx,
     needsTypeScript = argv.typescript,