File tree 1 file changed +14
-1
lines changed
1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -201,6 +201,8 @@ export default function vuePlugin(rawOptions: Options = {}): Plugin<Api> {
201
201
: createFilter ( customElement )
202
202
} )
203
203
204
+ let transformCachedModule = false
205
+
204
206
return {
205
207
name : 'vite:vue' ,
206
208
@@ -294,7 +296,6 @@ export default function vuePlugin(rawOptions: Options = {}): Plugin<Api> {
294
296
! config . isProduction
295
297
) ,
296
298
}
297
-
298
299
// #507 suppress warnings for non-recognized pseudo selectors from lightningcss
299
300
const _warn = config . logger . warn
300
301
config . logger . warn = ( ...args ) => {
@@ -308,6 +309,18 @@ export default function vuePlugin(rawOptions: Options = {}): Plugin<Api> {
308
309
}
309
310
_warn ( ...args )
310
311
}
312
+
313
+ transformCachedModule =
314
+ config . command === 'build' &&
315
+ options . value . sourceMap &&
316
+ config . build . watch != null
317
+ } ,
318
+
319
+ shouldTransformCachedModule ( { id } ) {
320
+ if ( transformCachedModule && parseVueRequest ( id ) . query . vue ) {
321
+ return true
322
+ }
323
+ return false
311
324
} ,
312
325
313
326
configureServer ( server ) {
You can’t perform that action at this time.
0 commit comments