fitty
fitty copied to clipboard
trying to use fitty with vue 3 and it does nothing with no error?
it just doesn't want to work? actually there is an error TypeError: null is not an object (evaluating 'e3.element.parentNode.clientWidth')
--------------
<script setup>
import { RouterLink, RouterView } from 'vue-router'
import HelloWorld from './components/HelloWorld.vue'
</script>
<template>
<header>
<img alt="Vue logo" class="logo" src="@/assets/logo.svg" width="125" height="125" />
<div class="wrapper">
<HelloWorld msg="You did it!" />
<nav>
<RouterLink to="/">Home</RouterLink>
<RouterLink to="/about">About</RouterLink>
</nav>
</div>
</header>
<RouterView />
<div id="my-element" style="height: 100px;width: 400px">Hello World</div>
</template>
<script>
import fitty from 'fitty'
fitty('#my-element',{
minSize: 16,
maxSize: 300,
});
</script>
did you find a solution ? @L-o-o-t