Skip to content

Commit

Permalink
fix: create-vite when targetDir is a valid packageName (vitejs#4247)
Browse files Browse the repository at this point in the history
  • Loading branch information
spencer17x authored and aleclarson committed Nov 8, 2021
1 parent a287d92 commit b176280
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/create-vite/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ async function init() {

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

pkg.name = packageName
pkg.name = packageName || targetDir

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

Expand Down

0 comments on commit b176280

Please sign in to comment.