import axios from 'axios';
results in vite throwing
Example CodeUncaught SyntaxError: import not found: default
import { createApp } from 'vue';
import TheContainer from './components/TheContainer.vue';
import axios from 'axios';
axios.defaults.baseURL = process.env.VUE_APP_API_URL;
const app = createApp({
components: {
TheContainer
}
})
app.axios = axios;
app.$http = axios;
app.config.globalProperties.axios = axios;
app.config.globalProperties.$http = axios;
app.mount('#app');
This is using axios 0.21.1 and vue 3.0.5
Trying to work out what is wrong... vuejs v3 cookbook sadly uses a call to the axios 0.14 code via a cdn