Skip to content

Commit 2e81d21

Browse files
authored
fix: opt in to import.meta.* properties (#1514)
1 parent 687ce09 commit 2e81d21

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

packages/nuxt/playground/pages/firestore-useDocument.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,14 @@ const { data: config, promise } = useDocument(configRef, { wait: true })
5757
5858
onMounted(() => {
5959
promise.value.then((data) => {
60-
if (process.client) {
60+
if (import.meta.client) {
6161
console.log('promise resolved', toRaw(data))
6262
}
6363
isDoneFetching.value = true
6464
})
6565
6666
usePendingPromises().then((data) => {
67-
if (process.client) {
67+
if (import.meta.client) {
6868
console.log('pending promise resolved', toRaw(data))
6969
}
7070
isAllDoneFetching.value = true

packages/nuxt/src/runtime/analytics/composables.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ import { useFirebaseApp } from '../app/composables'
88
* @returns the Analytics instance
99
*/
1010
export function useAnalytics() {
11-
return process.client ? getAnalytics(useFirebaseApp()) : null
11+
return import.meta.client ? getAnalytics(useFirebaseApp()) : null
1212
}

packages/nuxt/templates/plugin.ejs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default defineNuxtPlugin((nuxtApp) => {
1010
nuxtApp.vueApp.use(VueFire, { firebaseApp })
1111

1212
<% if(options.ssr) { %>
13-
if (process.server) {
13+
if (import.meta.server) {
1414
// collect the initial state
1515
nuxtApp.payload.vuefire = useSSRInitialState(undefined, firebaseApp)
1616
} else if (nuxtApp.payload?.vuefire) {

0 commit comments

Comments
 (0)