Skip to content

Commit

Permalink
fix: opt in to import.meta.* properties (#635)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Apr 8, 2024
1 parent 800d71f commit ce60ab4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/devtools/client/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { setupClientRPC } from './setup/client-rpc'
import { setupVueDevTools } from './setup/vue-devtools'
import { splitScreenAvailable } from '~/composables/storage'
if (process.client)
if (import.meta.client)
import('./setup/unocss-runtime')
useHead({
Expand Down
4 changes: 2 additions & 2 deletions packages/devtools/src/runtime/function-metrics-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function getStacktrace() {
}

export function initTimelineMetrics(): TimelineMetrics {
if (process.server)
if (import.meta.server)
return undefined!

if (window.__NUXT_DEVTOOLS_TIMELINE_METRICS__)
Expand Down Expand Up @@ -45,7 +45,7 @@ export function initTimelineMetrics(): TimelineMetrics {
const wrapperFunctions = new WeakMap<any, any>()

export function __nuxtTimelineWrap(name: string, fn: any) {
if (process.server)
if (import.meta.server)
return fn
if (typeof fn !== 'function')
return fn
Expand Down
2 changes: 1 addition & 1 deletion packages/devtools/src/runtime/use-nuxt-devtools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export function useNuxtDevTools(): Ref<NuxtDevtoolsHostClient | undefined> {
if (!process.dev)
return r

if (process.server)
if (import.meta.server)
return r

if (window.__NUXT_DEVTOOLS_HOST__) {
Expand Down

0 comments on commit ce60ab4

Please sign in to comment.