diff --git a/front/package.json b/front/package.json index 8037fb0a6..5dcd04691 100644 --- a/front/package.json +++ b/front/package.json @@ -17,7 +17,7 @@ }, "dependencies": { "axios": "0.26.0", - "axios-auth-refresh": "2.2.8", + "axios-auth-refresh": "^3.2.2", "diff": "5.0.0", "django-channels": "2.1.3", "focus-trap": "6.7.3", diff --git a/front/src/main.js b/front/src/main.js index ea98465ca..92f67b5ce 100644 --- a/front/src/main.js +++ b/front/src/main.js @@ -13,7 +13,7 @@ import store from './store' import GetTextPlugin from 'vue-gettext' import { sync } from 'vuex-router-sync' import locales from '@/locales' -import axiosAuthRefresh from 'axios-auth-refresh' +import createAuthRefreshInterceptor from 'axios-auth-refresh' import filters from '@/filters' // eslint-disable-line import { parseAPIErrors } from '@/utils' @@ -158,13 +158,6 @@ const refreshAuth = (failedRequest) => { } } -// TODO: This seems like a vite error, in production it thinks that -// axiosAuthRefresh is a following object: { default () { /* ... */} } -// Maybe we need to tweak the config? -const createAuthRefreshInterceptor = import.meta.env.DEV - ? axiosAuthRefresh - : axiosAuthRefresh.default - createAuthRefreshInterceptor(axios, refreshAuth) store.dispatch('instance/fetchFrontSettings').finally(() => { diff --git a/front/vite.config.js b/front/vite.config.js index 232cfe455..ee3ded929 100644 --- a/front/vite.config.js +++ b/front/vite.config.js @@ -26,9 +26,6 @@ export default defineConfig({ } } ], - build: { - transformMixedEsModules: true - }, resolve: { alias: { "@": path.resolve(__dirname, "./src"), diff --git a/front/yarn.lock b/front/yarn.lock index 8f8dea3dd..cb90b47d2 100644 --- a/front/yarn.lock +++ b/front/yarn.lock @@ -724,10 +724,10 @@ autoprefixer@^10.4.2: picocolors "^1.0.0" postcss-value-parser "^4.2.0" -axios-auth-refresh@2.2.8: - version "2.2.8" - resolved "https://registry.yarnpkg.com/axios-auth-refresh/-/axios-auth-refresh-2.2.8.tgz#de420b6b5d6efdb4ad3666e44c38960a9b08f382" - integrity sha512-WR59uCgO9VppC9VQU6vtszrAHnF3RtylkGltOGldfB4Rw+my0j9WdJuvRzMwiwTh+LmG/SQWzgeCfFYf8N4FIA== +axios-auth-refresh@^3.2.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/axios-auth-refresh/-/axios-auth-refresh-3.2.2.tgz#e3ef505932d33318c74c2ffce04c0fdc9767ffe0" + integrity sha512-Ocu8leYhuhNejH/RBC0tWpUuv0cOplvdwltIQuYmkhihbZ8AqR0qPIZs+fV5V3JL6L5IM4Y5rjHgXyQWozjM7g== axios@0.26.0: version "0.26.0"