File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,8 @@ const nuxtModule: Module<ModuleOptions> = function (moduleOptions) {
2929 const optionsPath : string = this . nuxt . resolver . resolveAlias ( options . optionsPath ||
3030 join ( this . options . dir ! . app || 'app' , 'laravel-echo' , 'options.js' ) )
3131
32+ delete options . optionsPath
33+
3234 // Register options template
3335 this . addTemplate ( {
3436 fileName : `laravel-echo/options.${ optionsPath && optionsPath . endsWith ( 'ts' ) ? 'ts' : 'js' } ` ,
@@ -40,10 +42,7 @@ const nuxtModule: Module<ModuleOptions> = function (moduleOptions) {
4042 const { dst } = this . addTemplate ( {
4143 src : resolve ( __dirname , './runtime/plugin.js' ) ,
4244 fileName : 'laravel-echo/plugin.js' ,
43- options : {
44- broadcaster : options . broadcaster ,
45- encrypted : options . encrypted
46- }
45+ options
4746 } )
4847
4948 plugins . push ( {
Original file line number Diff line number Diff line change 1+ import defu from 'defu'
12import options from './options'
23import { Echo } from '~echo'
34
@@ -19,7 +20,7 @@ export default async function (ctx, inject) {
1920 if ( ! window . io ) window . io = require ( 'socket.io-client' )
2021 < % } % >
2122
22- const echo = new Echo ( ctx , echoOptions )
23+ const echo = new Echo ( ctx , defu ( echoOptions , < %= serializeFunction ( options ) % > ) )
2324 await echo . init ( )
2425
2526 inject ( 'echo' , echo )
You can’t perform that action at this time.
0 commit comments