File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -245,22 +245,25 @@ export default function vuePlugin(rawOptions: Options = {}): Plugin<Api> {
245
245
} ,
246
246
247
247
config ( config ) {
248
+ const isDefineTrue = ( v : unknown ) => v === true || v === 'true'
248
249
return {
249
250
resolve : {
250
251
dedupe : config . build ?. ssr ? [ ] : [ 'vue' ] ,
251
252
} ,
252
253
define : {
253
254
__VUE_OPTIONS_API__ :
254
255
options . value . features ?. optionsAPI ??
255
- config . define ?. __VUE_OPTIONS_API__ ??
256
+ isDefineTrue ( config . define ?. __VUE_OPTIONS_API__ ) ??
256
257
true ,
257
258
__VUE_PROD_DEVTOOLS__ :
258
259
( options . value . features ?. prodDevtools ||
259
- config . define ?. __VUE_PROD_DEVTOOLS__ ) ??
260
+ isDefineTrue ( config . define ?. __VUE_PROD_DEVTOOLS__ ) ) ??
260
261
false ,
261
262
__VUE_PROD_HYDRATION_MISMATCH_DETAILS__ :
262
263
( options . value . features ?. prodHydrationMismatchDetails ||
263
- config . define ?. __VUE_PROD_HYDRATION_MISMATCH_DETAILS__ ) ??
264
+ isDefineTrue (
265
+ config . define ?. __VUE_PROD_HYDRATION_MISMATCH_DETAILS__ ,
266
+ ) ) ??
264
267
false ,
265
268
} ,
266
269
ssr : {
You can’t perform that action at this time.
0 commit comments