1- window . _ = require ( 'lodash' ) ;
1+ import _ from 'lodash' ;
2+ window . _ = _ ;
3+
4+ import 'bootstrap' ;
25
36/**
47 * We'll load the axios HTTP library which allows us to easily issue requests
58 * to our Laravel back-end. This library automatically handles sending the
69 * CSRF token as a header based on the value of the "XSRF" token cookie.
710 */
811
9- window . axios = require ( 'axios' ) ;
12+ import axios from 'axios' ;
13+ window . axios = axios ;
1014
1115window . axios . defaults . headers . common [ 'X-Requested-With' ] = 'XMLHttpRequest' ;
1216
@@ -18,11 +22,15 @@ window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
1822
1923// import Echo from 'laravel-echo';
2024
21- // window.Pusher = require('pusher-js');
25+ // import Pusher from 'pusher-js';
26+ // window.Pusher = Pusher;
2227
2328// window.Echo = new Echo({
2429// broadcaster: 'pusher',
25- // key: process.env.MIX_PUSHER_APP_KEY,
26- // cluster: process.env.MIX_PUSHER_APP_CLUSTER,
27- // forceTLS: true
30+ // key: import.meta.env.VITE_PUSHER_APP_KEY,
31+ // wsHost: import.meta.env.VITE_PUSHER_HOST ?? `ws-${import.meta.env.VITE_PUSHER_APP_CLUSTER}.pusher.com`,
32+ // wsPort: import.meta.env.VITE_PUSHER_PORT ?? 80,
33+ // wssPort: import.meta.env.VITE_PUSHER_PORT ?? 443,
34+ // forceTLS: (import.meta.env.VITE_PUSHER_SCHEME ?? 'https') === 'https',
35+ // enabledTransports: ['ws', 'wss'],
2836// });
0 commit comments