File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 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> {
201201 : createFilter ( customElement )
202202 } )
203203
204+ let transformCachedModule = false
205+
204206 return {
205207 name : 'vite:vue' ,
206208
@@ -294,7 +296,6 @@ export default function vuePlugin(rawOptions: Options = {}): Plugin<Api> {
294296 ! config . isProduction
295297 ) ,
296298 }
297-
298299 // #507 suppress warnings for non-recognized pseudo selectors from lightningcss
299300 const _warn = config . logger . warn
300301 config . logger . warn = ( ...args ) => {
@@ -308,6 +309,18 @@ export default function vuePlugin(rawOptions: Options = {}): Plugin<Api> {
308309 }
309310 _warn ( ...args )
310311 }
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
311324 } ,
312325
313326 configureServer ( server ) {
You can’t perform that action at this time.
0 commit comments