File tree Expand file tree Collapse file tree 2 files changed +14
-13
lines changed Expand file tree Collapse file tree 2 files changed +14
-13
lines changed Original file line number Diff line number Diff line change @@ -46,11 +46,14 @@ const nuxtModule: Module<ModuleOptions> = function (moduleOptions) {
46
46
}
47
47
} )
48
48
49
- plugins . push ( resolve ( this . options . buildDir , dst ) )
49
+ plugins . push ( {
50
+ src : resolve ( this . options . buildDir , dst ) ,
51
+ ssr : false
52
+ } )
50
53
51
54
// Extend echo with plugins
52
55
if ( options . plugins ) {
53
- options . plugins . forEach ( p => plugins . push ( p ) )
56
+ options . plugins . forEach ( p => plugins . push ( { src : p , ssr : false } ) )
54
57
55
58
delete options . plugins
56
59
}
Original file line number Diff line number Diff line change @@ -7,19 +7,17 @@ import { Echo } from '~echo'
7
7
export default async function ( ctx , inject ) {
8
8
const echoOptions = typeof options === 'function' ? await options ( ctx ) : options
9
9
10
- if ( process . client ) {
11
- < % if ( options . broadcaster === 'pusher' && ! options . encrypted ) { % >
12
- if ( ! window . Pusher ) window . Pusher = require ( 'pusher-js' )
13
- < % } % >
10
+ < % if ( options . broadcaster === 'pusher' && ! options . encrypted ) { % >
11
+ if ( ! window . Pusher ) window . Pusher = require ( 'pusher-js' )
12
+ < % } % >
14
13
15
- < % if ( options . broadcaster === 'pusher' && options . encrypted ) { % >
16
- if ( ! window . Pusher ) window . Pusher = require ( 'pusher-js/with-encryption' )
17
- < % } % >
14
+ < % if ( options . broadcaster === 'pusher' && options . encrypted ) { % >
15
+ if ( ! window . Pusher ) window . Pusher = require ( 'pusher-js/with-encryption' )
16
+ < % } % >
18
17
19
- < % if ( options . broadcaster === 'socket.io' ) { % >
20
- if ( ! window . io ) window . io = require ( 'socket.io-client' )
21
- < % } % >
22
- }
18
+ < % if ( options . broadcaster === 'socket.io' ) { % >
19
+ if ( ! window . io ) window . io = require ( 'socket.io-client' )
20
+ < % } % >
23
21
24
22
const echo = new Echo ( ctx , echoOptions )
25
23
await echo . init ( )
You can’t perform that action at this time.
0 commit comments