vuetify icon indicating copy to clipboard operation
vuetify copied to clipboard

perf: enable jsx optimize

Open KaelWD opened this issue 7 months ago • 3 comments

KaelWD avatar Jun 05 '25 10:06 KaelWD

I think the existing dynamic slots check is too greedy, it marks slots as unstable if they refer to a variable outside the slot scope which the vue template compiler doesn't do.

KaelWD avatar Jun 05 '25 10:06 KaelWD

These tests all pass locally :angry:

KaelWD avatar Jun 05 '25 10:06 KaelWD

When I ran locally here is what I got:

pnpm test:unit: https://bin.vuetifyjs.com/bins/7s94Eg pnpm test:browser: https://bin.vuetifyjs.com/bins/hBlhPg

johnleider avatar Jun 06 '25 00:06 johnleider

:rocket: Nightly release published to @vuetify/[email protected].

github-actions[bot] avatar Jul 11 '25 08:07 github-actions[bot]

This will need real-world testing to ensure it doesn't introduce reactivity problems.

KaelWD avatar Jul 11 '25 08:07 KaelWD

Breaks dynamic slots, with optimize: true the label doesn't change:

<template>
  <v-app>
    <v-container>
      <v-switch v-model="customLabel" />

      <v-text-field label="Label">
        <template v-if="customLabel" #label="{ label }">Custom {{ label }}</template>
      </v-text-field>
    </v-container>
  </v-app>
</template>

<script setup>
  import { ref } from 'vue'

  const customLabel = ref(false)
</script>

KaelWD avatar Jul 15 '25 10:07 KaelWD