bootstrap.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. import './bootstrap';
  2. /**
  3. * We'll load the axios HTTP library which allows us to easily issue requests
  4. * to our Laravel back-end. This library automatically handles sending the
  5. * CSRF token as a header based on the value of the "XSRF" token cookie.
  6. */
  7. import axios from 'axios';
  8. window.axios = axios;
  9. window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
  10. /**
  11. * Echo exposes an expressive API for subscribing to channels and listening
  12. * for events that are broadcast by Laravel. Echo and event broadcasting
  13. * allows your team to easily build robust real-time web applications.
  14. */
  15. // import Echo from 'laravel-echo';
  16. // import Pusher from 'pusher-js';
  17. // window.Pusher = Pusher;
  18. // window.Echo = new Echo({
  19. // broadcaster: 'pusher',
  20. // key: import.meta.env.VITE_PUSHER_APP_KEY,
  21. // wsHost: import.meta.env.VITE_PUSHER_HOST ?? `ws-${import.meta.env.VITE_PUSHER_APP_CLUSTER}.pusher.com`,
  22. // wsPort: import.meta.env.VITE_PUSHER_PORT ?? 80,
  23. // wssPort: import.meta.env.VITE_PUSHER_PORT ?? 443,
  24. // forceTLS: (import.meta.env.VITE_PUSHER_SCHEME ?? 'https') === 'https',
  25. // enabledTransports: ['ws', 'wss'],
  26. // });