File tree Expand file tree Collapse file tree 5 files changed +168
-91
lines changed
Expand file tree Collapse file tree 5 files changed +168
-91
lines changed Original file line number Diff line number Diff line change 148148 "picomatch" : " ^4.0.3" ,
149149 "scule" : " ^1.3.0" ,
150150 "tinyglobby" : " ^0.2.15" ,
151- "unplugin" : " ^2.3.11 " ,
151+ "unplugin" : " ^3.0.0 " ,
152152 "unplugin-utils" : " ^0.3.1" ,
153153 "yaml" : " ^2.8.2"
154154 },
182182 "rimraf" : " ^6.1.2" ,
183183 "rollup" : " ^4.55.1" ,
184184 "rollup-plugin-typescript2" : " ^0.36.0" ,
185- "tsdown" : " 0.20.0-beta.3 " ,
185+ "tsdown" : " ^ 0.20.1 " ,
186186 "tsup" : " ^8.5.1" ,
187187 "vite" : " ^7.3.0" ,
188188 "vue" : " 3.6.0-beta.2"
Original file line number Diff line number Diff line change 11// Global compile-time constants
22declare var __DEV__ : boolean
33declare var __TEST__ : boolean
4+ // TODO: refactor all these feature flags
45declare var __FEATURE_PROD_DEVTOOLS__ : boolean
6+ // iifee build cannot have v8 devtools because they are too heavy
7+ declare var __STRIP_DEVTOOLS__ : boolean
58declare var __BROWSER__ : boolean
Original file line number Diff line number Diff line change @@ -1067,7 +1067,11 @@ export function createRouter(options: RouterOptions): Router {
10671067 }
10681068
10691069 // TODO: this probably needs to be updated so it can be used by vue-termui
1070- if ( ( __DEV__ || __FEATURE_PROD_DEVTOOLS__ ) && isBrowser ) {
1070+ if (
1071+ ( __DEV__ || __FEATURE_PROD_DEVTOOLS__ ) &&
1072+ isBrowser &&
1073+ ! __STRIP_DEVTOOLS__
1074+ ) {
10711075 addDevtools ( app , router as Router , matcher )
10721076 }
10731077 } ,
Original file line number Diff line number Diff line change @@ -37,6 +37,8 @@ const commonOptions = {
3737 __BROWSER__ : 'true' ,
3838 // is replaced by the vite vue plugin
3939 __FEATURE_PROD_DEVTOOLS__ : `__VUE_PROD_DEVTOOLS__` ,
40+ // by default we keep them
41+ __STRIP_DEVTOOLS__ : `false` ,
4042 } ,
4143 dts : false ,
4244 // TODO: remove in v5
@@ -125,8 +127,6 @@ const cjsProd = {
125127const iife = {
126128 ...commonOptions ,
127129 format : 'iife' ,
128- // TODO: remove when upgrading to devtools-api v7 because it's too big
129- noExternal : [ '@vue/devtools-api' ] ,
130130 outputOptions : {
131131 ...commonOptions . outputOptions ,
132132 dir : undefined , // must be unset with file
@@ -135,7 +135,9 @@ const iife = {
135135 define : {
136136 ...commonOptions . define ,
137137 __DEV__ : 'true' ,
138- __FEATURE_PROD_DEVTOOLS__ : `true` ,
138+ // the new devtools api does not have iife support and are too heavy
139+ __FEATURE_PROD_DEVTOOLS__ : `false` ,
140+ __STRIP_DEVTOOLS__ : `true` ,
139141 } ,
140142} satisfies InlineConfig
141143
You can’t perform that action at this time.
0 commit comments