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) {
4646 }
4747 } )
4848
49- plugins . push ( resolve ( this . options . buildDir , dst ) )
49+ plugins . push ( {
50+ src : resolve ( this . options . buildDir , dst ) ,
51+ ssr : false
52+ } )
5053
5154 // Extend echo with plugins
5255 if ( options . plugins ) {
53- options . plugins . forEach ( p => plugins . push ( p ) )
56+ options . plugins . forEach ( p => plugins . push ( { src : p , ssr : false } ) )
5457
5558 delete options . plugins
5659 }
Original file line number Diff line number Diff line change @@ -7,19 +7,17 @@ import { Echo } from '~echo'
77export default async function ( ctx , inject ) {
88 const echoOptions = typeof options === 'function' ? await options ( ctx ) : options
99
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+ < % } % >
1413
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+ < % } % >
1817
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+ < % } % >
2321
2422 const echo = new Echo ( ctx , echoOptions )
2523 await echo . init ( )
You can’t perform that action at this time.
0 commit comments