Switch to ESM imports (#5895)
This improves the transition for Vite users.
This commit is contained in:
@@ -1 +1 @@
|
|||||||
require('./bootstrap');
|
import './bootstrap';
|
||||||
|
|||||||
9
resources/js/bootstrap.js
vendored
9
resources/js/bootstrap.js
vendored
@@ -1,4 +1,5 @@
|
|||||||
window._ = require('lodash');
|
import _ from 'lodash';
|
||||||
|
window._ = _;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* We'll load the axios HTTP library which allows us to easily issue requests
|
* We'll load the axios HTTP library which allows us to easily issue requests
|
||||||
@@ -6,7 +7,8 @@ window._ = require('lodash');
|
|||||||
* CSRF token as a header based on the value of the "XSRF" token cookie.
|
* CSRF token as a header based on the value of the "XSRF" token cookie.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
window.axios = require('axios');
|
import axios from 'axios';
|
||||||
|
window.axios = axios;
|
||||||
|
|
||||||
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
|
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
|
||||||
|
|
||||||
@@ -18,7 +20,8 @@ window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
|
|||||||
|
|
||||||
// import Echo from 'laravel-echo';
|
// import Echo from 'laravel-echo';
|
||||||
|
|
||||||
// window.Pusher = require('pusher-js');
|
// import Pusher from 'pusher-js';
|
||||||
|
// window.Pusher = Pusher;
|
||||||
|
|
||||||
// window.Echo = new Echo({
|
// window.Echo = new Echo({
|
||||||
// broadcaster: 'pusher',
|
// broadcaster: 'pusher',
|
||||||
|
|||||||
Reference in New Issue
Block a user