Skip to content

Commit 5e07c8a

Browse files
committed
fix: opt in to import.meta.* properties
1 parent 2e600af commit 5e07c8a

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

docs/content/1.getting-started/2.configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ component is rendered, you must manually initialize the tsParticles library (suc
7070
import { tsParticles } from '@tsparticles/engine'
7171
import { loadFull } from 'tsparticles' // or whichever bundle you wish to use
7272
73-
if (process.client) {
73+
if (import.meta.client) {
7474
// This example will BLOCK your application from rendering until the tsParticles library is initialized
7575
// You can put this in some other place if you know that you won't be loading particles until after the first paint
7676
await loadFull(tsParticles)

playground/app.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const { mode } = useRuntimeConfig().public.particles
2626
2727
const show = ref(false)
2828
29-
if(process.client && mode === 'custom') {
29+
if(import.meta.client && mode === 'custom') {
3030
await loadFull(tsParticles)
3131
}
3232

src/runtime/plugins/particle-loader.client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { loadParticles } from '../lib/loaders'
33
import { tsParticles} from 'tsparticles-engine'
44

55
export default defineNuxtPlugin(async (nuxtApp) => {
6-
if(process.server) { return }
6+
if(import.meta.server) { return }
77

88
const runtimeConfig = useRuntimeConfig()
99
const { mode } = runtimeConfig.public.particles

0 commit comments

Comments
 (0)