bootstrap.js 1.3 KB

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