1// nuxt.config.js
2/*
3 ** Plugins to load before mounting the App
4 */
5plugins: [{ src: '@/plugins/actioncable-vue', ssr: false }];
1// /plugins/actioncable-vue.js
2
3import Vue from 'vue';
4import ActionCableVue from 'actioncable-vue';
5
6if (process.client) {
7 Vue.use(ActionCableVue, {
8 debug: true,
9 debugLevel: 'all',
10 connectionUrl: process.env.WEBSOCKET_HOST,
11 connectImmediately: true
12 });
13}
1import store from './store';
2import Vue from 'vue';
3import ActionCableVue from 'actioncable-vue';
4
5Vue.use(ActionCableVue, {
6 debug: true,
7 debugLevel: 'all',
8 connectionUrl: process.env.WEBSOCKET_HOST,
9 connectImmediately: true,
10 store
11});