diff --git a/packages/create-vite/index.js b/packages/create-vite/index.js index 4c5879bdd0bd12..efcf63cb6a8629 100755 --- a/packages/create-vite/index.js +++ b/packages/create-vite/index.js @@ -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 {