-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nuxt 3 Support #77
Comments
Is there any solution to this issue? Because we developed a project with Nuxt 3 and we are close to the end of the project. import Echo from 'laravel-echo'
window.io = require('socket.io-client')
export default ({ app, env }) => {
window.echo = new Echo({
broadcaster: 'socket.io',
host: `http://localhost:6001`,
})
} When I create a plugin in this way
|
The issue you have is that it's trying to server-side render the plugin but I'd also move |
I tried it with the method you said. It worked, thank you very much. However, using Laravel Reverb, I installed Pusher server on my own server. Those who have problems like me can solve it this way. //laravel-echo.client.ts
import Echo from 'laravel-echo'
import Pusher from 'pusher-js'
export default defineNuxtPlugin(() => {
window.Pusher = Pusher
window.Echo = new Echo({
broadcaster: 'reverb',
key: import.meta.env.VITE_REVERB_APP_KEY,
wsHost: import.meta.env.VITE_REVERB_HOST,
wsPort: import.meta.env.VITE_REVERB_PORT ?? 80,
wssPort: import.meta.env.VITE_REVERB_PORT ?? 443,
forceTLS: (import.meta.env.VITE_REVERB_SCHEME ?? 'https') === 'https',
enabledTransports: ['ws', 'wss'],
auth: {
headers: {
Authorization: `Bearer ${useCookie('accessToken').value}`,
Accept: 'application/json',
},
},
})
}) |
Hi 👋 It looks like this module hasn't been updated for Nuxt 3. In an effort to improve the developer experience of modules, I've updated the module to clarify that it only supports Nuxt 2.
If Nuxt 3 support is added it will be moved to the https://github.com/nuxt-modules organisation.
@ricardogobbosouza Is Nuxt 3 support something you have planned? If not, perhaps we can archive this module?
Please let us know and thanks for your work!
The text was updated successfully, but these errors were encountered: