Skip to content

Commit

Permalink
feat: support passing --flag=false via cli
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed May 2, 2020
1 parent f164e46 commit 3ff579c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bin/vite.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ const getIPv4AddressList = require('../dist/utils').getIPv4AddressList

console.log(chalk.cyan(`vite v${require('../package.json').version}`))

Object.keys(argv).forEach((key) => {
if (argv[key] === 'false') {
argv[key] = false
}
})

if (argv._[0] === 'build') {
console.log(chalk.yellow('Building for production...'))
require('../dist')
Expand Down

0 comments on commit 3ff579c

Please sign in to comment.