websanova / vue-auth

A simple light-weight authentication library for Vue.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Package not working with Vue.js 3.3 and Vite

tchery opened this issue · comments

Hi Rob.

Do you plan to share a demo based on Vite instead of Webpack ?

I tried to import the code of your demo version 3.x into my Vue.js 3.3.11 project and it is not working.
I would be very thankful for your help.

Hi.

After some tests and research, I found solution.

In the .env file, the endpoint has to be :
VITE_APP_API_URL=http://some_url

And then, in src/http/index.js (line 3) :
axios.defaults.baseURL = import.meta.env.VITE_APP_API_URL