Skip to content

Commit

Permalink
fix(update): improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
ThornWalli committed Jun 7, 2023
1 parent b1318f7 commit 096a93d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions playground/components/BaseButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<script setup>
import { useFonts } from '#speedkit/composables/fonts';
const { $getFont } = useFonts();
defineEmits(['click']);
</script>

<script>
Expand All @@ -24,8 +25,7 @@ export default {
type: String,
default: 'Button Label'
}
},
emits: ['click']
}
};
</script>

Expand Down
2 changes: 0 additions & 2 deletions src/runtime/components/SpeedkitLayer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@
<script setup>
import { getStyleDescription } from '#speedkit/utils/description';
import {useHead} from '#imports'
const isServer = ref(true);
Expand Down
7 changes: 4 additions & 3 deletions src/runtime/utils/description.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ import { toHashHex } from '#speedkit/utils/string';

export function getImagePreloadDescription(
{ srcset, sizes, type },
fetchpriority = 'high',
crossorigin,
callback = () => {}
) {
return {
tagPriority: 2,
fetchpriority: 'low',
fetchpriority,
key: toHashHex(srcset),
rel: 'preload',
as: 'image',
Expand All @@ -22,13 +23,13 @@ export function getImagePreloadDescription(
export function getFontPreloadDescription(
font,
media,
fetchpriority = 'high',
crossorigin,
callback = () => {}
) {
return {
tagPriority: 2,
fetchpriority: 'low',
// blocking: 'render',
fetchpriority,
key: toHashHex(
`${font.family}-${font.weight}-${font.style}-${media}`.toLowerCase()
),
Expand Down

0 comments on commit 096a93d

Please sign in to comment.