We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2abcc7c commit 6ccadd3Copy full SHA for 6ccadd3
src/core/index.ts
@@ -238,6 +238,8 @@ export const plugin: UnpluginInstance<Options | undefined, false> =
238
version,
239
}
240
241
+ let transformCachedModule = false
242
+
243
return {
244
name: 'unplugin-vue',
245
@@ -340,6 +342,18 @@ export const plugin: UnpluginInstance<Options | undefined, false> =
340
342
341
343
_warn(...args)
344
345
346
+ transformCachedModule =
347
+ config.command === 'build' &&
348
+ options.value.sourceMap &&
349
+ config.build.watch != null
350
+ },
351
352
+ shouldTransformCachedModule({ id }) {
353
+ if (transformCachedModule && parseVueRequest(id).query.vue) {
354
+ return true
355
+ }
356
+ return false
357
},
358
359
configureServer(server) {
0 commit comments