Skip to content

Commit

Permalink
fix(optimization): added useBoosterCritical youtube/vimeo
Browse files Browse the repository at this point in the history
  • Loading branch information
ThornWalli committed Jul 21, 2024
1 parent 41fd356 commit a159706
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/runtime/components/BoosterVimeo/Base.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</template>

<script>
import { useHead, markRaw, computed, ref } from '#imports';
import { useHead, markRaw, computed, ref, useBoosterCritical } from '#imports';
import DefaultButton from '../Button';
import { load, ready } from './utils/loader';
Expand Down Expand Up @@ -103,6 +103,8 @@ export default {
emits: ['playing', 'ready'],
async setup(props) {
useBoosterCritical();
const script = ref([]);
if (!(import.meta.server || process.env.prerender)) {
Expand Down
4 changes: 3 additions & 1 deletion src/runtime/components/BoosterYoutube/Base.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</template>

<script>
import { useHead, ref, computed, markRaw } from '#imports';
import { useHead, ref, computed, markRaw, useBoosterCritical } from '#imports';
import DefaultButton from '../Button';
import { load } from './utils/loader';
Expand Down Expand Up @@ -99,6 +99,8 @@ export default {
emits: ['ready', 'playing'],
setup() {
useBoosterCritical();
const script = ref([]);
useHead({
script: computed(() => {
Expand Down

0 comments on commit a159706

Please sign in to comment.