ssrBoot.mjs 484 B

1234567891011121314151617181920
  1. // Utilities
  2. import { computed, onMounted, readonly, shallowRef } from 'vue';
  3. // Composables
  4. export function useSsrBoot() {
  5. const isBooted = shallowRef(false);
  6. onMounted(() => {
  7. window.requestAnimationFrame(() => {
  8. isBooted.value = true;
  9. });
  10. });
  11. const ssrBootStyles = computed(() => !isBooted.value ? {
  12. transition: 'none !important'
  13. } : undefined);
  14. return {
  15. ssrBootStyles,
  16. isBooted: readonly(isBooted)
  17. };
  18. }
  19. //# sourceMappingURL=ssrBoot.mjs.map