All files / apps/huella-legal/modules keepServerPrefetch.ts

0% Statements 0/4
0% Branches 0/2
0% Functions 0/2
0% Lines 0/2

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13                         
import { defineNuxtModule } from "nuxt/kit";
 
// Vue counts an onServerPrefetch hook (every Nuxt Icon has one) as a useId boundary, so a client
// build that strips it hydrates Reka's aria-controls with ids the server never rendered
export default defineNuxtModule({
    meta: { name: "keep-server-prefetch" },
 
    setup: (_, { options }) => {
        const { client } = options.optimization.treeShake.composables;
        if (client.vue) client.vue = client.vue.filter((name) => name !== "onServerPrefetch");
    },
});