Skip to content

Commit

Permalink
fix(create-vite): project name with only numbers as an argument (#4606)
Browse files Browse the repository at this point in the history
  • Loading branch information
task4233 committed Aug 18, 2021
1 parent ad71494 commit 085a621
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/create-vite/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
// @ts-check
const fs = require('fs')
const path = require('path')
const argv = require('minimist')(process.argv.slice(2))
// Avoids autoconversion to number of the project name by defining that the args
// non associated with an option ( _ ) needs to be parsed as a string. See #4606
const argv = require('minimist')(process.argv.slice(2), { string: ['_'] })
// eslint-disable-next-line node/no-restricted-require
const prompts = require('prompts')
const {
Expand Down

0 comments on commit 085a621

Please sign in to comment.