bootstrap.js 1.2 KB

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