Use ES modules

This commit is contained in:
Shift
2024-02-17 19:03:24 +00:00
parent 4430b21740
commit baf7131f20

View File

@@ -1,5 +1,6 @@
window._ = require('lodash');
import _ from 'lodash';
window._ = _;
/**
* We'll load jQuery and the Bootstrap jQuery plugin which provides support
@@ -19,7 +20,8 @@ try {
* 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';