File tree 2 files changed +5
-5
lines changed
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) {
29
29
const optionsPath : string = this . nuxt . resolver . resolveAlias ( options . optionsPath ||
30
30
join ( this . options . dir ! . app || 'app' , 'laravel-echo' , 'options.js' ) )
31
31
32
+ delete options . optionsPath
33
+
32
34
// Register options template
33
35
this . addTemplate ( {
34
36
fileName : `laravel-echo/options.${ optionsPath && optionsPath . endsWith ( 'ts' ) ? 'ts' : 'js' } ` ,
@@ -40,10 +42,7 @@ const nuxtModule: Module<ModuleOptions> = function (moduleOptions) {
40
42
const { dst } = this . addTemplate ( {
41
43
src : resolve ( __dirname , './runtime/plugin.js' ) ,
42
44
fileName : 'laravel-echo/plugin.js' ,
43
- options : {
44
- broadcaster : options . broadcaster ,
45
- encrypted : options . encrypted
46
- }
45
+ options
47
46
} )
48
47
49
48
plugins . push ( {
Original file line number Diff line number Diff line change
1
+ import defu from 'defu'
1
2
import options from './options'
2
3
import { Echo } from '~echo'
3
4
@@ -19,7 +20,7 @@ export default async function (ctx, inject) {
19
20
if ( ! window . io ) window . io = require ( 'socket.io-client' )
20
21
< % } % >
21
22
22
- const echo = new Echo ( ctx , echoOptions )
23
+ const echo = new Echo ( ctx , defu ( echoOptions , < %= serializeFunction ( options ) % > ) )
23
24
await echo . init ( )
24
25
25
26
inject ( 'echo' , echo )
You can’t perform that action at this time.
0 commit comments