Skip to content

Commit fa42bdf

Browse files
committed
fix: rolled back to pusher 8.3
1 parent da14f65 commit fa42bdf

File tree

3 files changed

+85
-58
lines changed

3 files changed

+85
-58
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"@nuxt/kit": "^3.12.3",
4343
"defu": "^6.1.4",
4444
"laravel-echo": "^1.16.1",
45-
"pusher-js": "8.4.0-rc2"
45+
"pusher-js": "8.3.0"
4646
},
4747
"devDependencies": {
4848
"@nuxt/devtools": "^1.3.9",

pnpm-lock.yaml

Lines changed: 81 additions & 54 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/runtime/plugin.client.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@ import type { Channel, Options, ChannelAuthorizationCallback } from 'pusher-js'
33
import type { ChannelAuthorizationData } from 'pusher-js/types/src/core/auth/options'
44
import { createConsola, type ConsolaInstance } from 'consola'
55
import type { FetchOptions } from 'ofetch'
6+
import Pusher from 'pusher-js'
67
import { useEchoConfig } from './composables/useEchoConfig'
78
import type { Authentication, ModuleOptions } from './types'
89
import { defineNuxtPlugin, createError, useCookie } from '#app'
910

1011
declare global {
1112
interface Window {
1213
Echo: Echo
14+
Pusher: typeof Pusher
1315
}
1416
}
1517

@@ -135,9 +137,7 @@ export default defineNuxtPlugin(async (_nuxtApp) => {
135137
const config = useEchoConfig()
136138
const logger = createEchoLogger(config.logLevel)
137139

138-
const pusher = await import('pusher-js')
139-
// @ts-expect-error Pusher is not defined on Window
140-
window.Pusher = pusher.default || pusher
140+
window.Pusher = Pusher
141141
window.Echo = new Echo(prepareEchoOptions(config, logger))
142142

143143
logger.debug('Laravel Echo client initialized')

0 commit comments

Comments
 (0)