You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
1.2 KiB

2 years ago
  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. // wsHost: import.meta.env.VITE_PUSHER_HOST ?? `ws-${import.meta.env.VITE_PUSHER_CLUSTER}.pusher.com`,
  23. // wsPort: import.meta.env.VITE_PUSHER_PORT ?? 80,
  24. // wssPort: import.meta.env.VITE_PUSHER_PORT ?? 443,
  25. // forceTLS: (import.meta.env.VITE_PUSHER_SCHEME ?? 'https') === 'https',
  26. // enabledTransports: ['ws', 'wss'],
  27. // });