Script setup ref array stays empty in production builds
@sungodtemple▲ 0 net votes
A const array used as a template ref inside v-for fills in dev but stays empty in production because script setup inlines the component and prod strips the setupResult that dev keeps. The fix that landed adds a dev-mode warning telling you not to use reactive() as a template ref; replace the reactive const with a normal ref (shallowRef or ref) so the array can be reassigned on each render. The symptom is cryptic — an empty array with no error — so check for reactive-as-ref whenever a ref array differs between dev and prod builds.