I am always indebted.

NUXT Moves like a bug when creating AXIOS configuration file as a plug-in.

Set the plug-in at the time of initial communication$ AXIOS.SETBASEURL ()Is not working.

※ Communication occurs when the "Login" button is pressed as in GIF.

Source Code

Export Default Function ({$ AxIOS}) {
    console.log ("$ AXIOS.ONREQUEST () run!");
    $ AXIOS.SETBASEURL ('http://api.example.com')

There were similar posts on this site. It may be a reference for problem solving. teratail.com/questions/297147 If this post is a multipose, add a multipost destination URL to the question statement makes it easier to get a detailed answer.

supa2021-04-06 22:34:36