Skip to content

Commit 085a621

Browse files
authored
fix(create-vite): project name with only numbers as an argument (#4606)
1 parent ad71494 commit 085a621

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/create-vite/index.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
// @ts-check
44
const fs = require('fs')
55
const path = require('path')
6-
const argv = require('minimist')(process.argv.slice(2))
6+
// Avoids autoconversion to number of the project name by defining that the args
7+
// non associated with an option ( _ ) needs to be parsed as a string. See #4606
8+
const argv = require('minimist')(process.argv.slice(2), { string: ['_'] })
79
// eslint-disable-next-line node/no-restricted-require
810
const prompts = require('prompts')
911
const {

0 commit comments

Comments
 (0)