Skip to content

Commit 02e244d

Browse files
authored
fix: create-vite when targetDir is a valid packageName (#4247)
1 parent 0316f14 commit 02e244d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/create-vite/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ async function init() {
250250

251251
const pkg = require(path.join(templateDir, `package.json`))
252252

253-
pkg.name = packageName
253+
pkg.name = packageName || targetDir
254254

255255
write('package.json', JSON.stringify(pkg, null, 2))
256256

0 commit comments

Comments
 (0)