File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
packages/devtools/src/app/components/flowmap Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import PluginName from '../display/PluginName.vue'
7
7
const props = defineProps <{
8
8
info: ModuleInfo
9
9
session: SessionContext
10
+ transformsLoading: boolean
10
11
}>()
11
12
const { info } = toRefs (props )
12
13
@@ -246,7 +247,8 @@ const codeDisplay = computed(() => {
246
247
>
247
248
<template #node >
248
249
<div i-ph-magic-wand-duotone /> Transform
249
- <span op50 text-xs >({{ info.transforms.length }})</span >
250
+ <span v-if =" transformsLoading" i-ph-spinner animate-spin />
251
+ <span v-else op50 text-xs >({{ info.transforms.length }})</span >
250
252
</template >
251
253
<template #container >
252
254
<div >
Original file line number Diff line number Diff line change @@ -11,14 +11,17 @@ const props = defineProps<{
11
11
12
12
const rpc = useRpc ()
13
13
const transforms = ref <RolldownModuleTransformInfo []>([])
14
+ const transformsLoading = ref (false )
14
15
watchEffect (async () => {
15
16
const arg = {
16
17
session: props .session .id ,
17
18
module: props .module ,
18
19
}
19
20
// fetch transforms in the next tick to avoid race conditions with module info
20
21
nextTick (async () => {
22
+ transformsLoading .value = true
21
23
transforms .value = await rpc .value ! [' vite:rolldown:get-module-transforms' ]?.(arg )
24
+ transformsLoading .value = false
22
25
})
23
26
})
24
27
@@ -41,6 +44,7 @@ const info = computedAsync(async () => {
41
44
p4
42
45
:info
43
46
:session
47
+ :transforms-loading
44
48
/>
45
49
<ChartModuleFlamegraph
46
50
:info
You can’t perform that action at this time.
0 commit comments