We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
define
1 parent 20ea999 commit 9f8381eCopy full SHA for 9f8381e
packages/plugin-vue-jsx/index.js
@@ -48,21 +48,15 @@ function vueJsxPlugin(options = {}) {
48
name: 'vite:vue-jsx',
49
50
config(config) {
51
- const optionsApi = config.define
52
- ? config.define.__VUE_OPTIONS_API__
53
- : undefined
54
- const devTools = config.define
55
- ? config.define.__VUE_PROD_DEVTOOLS__
56
57
return {
58
// only apply esbuild to ts files
59
// since we are handling jsx and tsx now
60
esbuild: {
61
include: /\.ts$/
62
},
63
define: {
64
- __VUE_OPTIONS_API__: optionsApi != null ? optionsApi : true,
65
- __VUE_PROD_DEVTOOLS__: devTools != null ? devTools : false
+ __VUE_OPTIONS_API__: config.define?.__VUE_OPTIONS_API__ ?? true,
+ __VUE_PROD_DEVTOOLS__: config.define?.__VUE_PROD_DEVTOOLS__ ?? false
66
}
67
68
0 commit comments