We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent df6f32f commit d4bc0fbCopy full SHA for d4bc0fb
packages/vite/src/node/cli.ts
@@ -112,9 +112,21 @@ const convertHost = (v: any) => {
112
return v
113
}
114
115
+/**
116
+ * base may be a number (like 0), should convert to empty string
117
+ */
118
+const convertBase = (v: any) => {
119
+ if (v === 0) {
120
+ return ''
121
+ }
122
+ return v
123
+}
124
+
125
cli
126
.option('-c, --config <file>', `[string] use specified config file`)
- .option('--base <path>', `[string] public base path (default: /)`)
127
+ .option('--base <path>', `[string] public base path (default: /)`, {
128
+ type: [convertBase],
129
+ })
130
.option('-l, --logLevel <level>', `[string] info | warn | error | silent`)
131
.option('--clearScreen', `[boolean] allow/disable clear screen when logging`)
132
.option('-d, --debug [feat]', `[string | boolean] show debug logs`)
0 commit comments