fix: opt in to import.meta.* properties (#1561)

Co-authored-by: Benjamin Canac <canacb1@gmail.com>
This commit is contained in:
Daniel Roe
2024-03-25 16:57:58 +00:00
committed by GitHub
parent ae58d5c2b9
commit cc62e345eb
6 changed files with 7 additions and 7 deletions

View File

@@ -3,7 +3,7 @@ import { ref, computed, onMounted } from 'vue'
import type {} from '@vueuse/shared'
export const _useShortcuts = () => {
const macOS = computed(() => process.client && navigator && navigator.userAgent && navigator.userAgent.match(/Macintosh;/))
const macOS = computed(() => import.meta.client && navigator && navigator.userAgent && navigator.userAgent.match(/Macintosh;/))
const metaSymbol = ref(' ')

View File

@@ -41,7 +41,7 @@ ${Object.entries(gray || colors.cool).map(([key, value]) => `--color-gray-${key}
}
// SPA mode
if (process.client && nuxtApp.isHydrating && !nuxtApp.payload.serverRendered) {
if (import.meta.client && nuxtApp.isHydrating && !nuxtApp.payload.serverRendered) {
const style = document.createElement('style')
style.innerHTML = root.value