[Vuejs]-Importing dependency works in one file, but not the other

0👍

import axios from 'axios'

That should be only in actions.js file, because that’s where you use it. And yes, you need to import it in every file separately or use globals.

0👍

define axios globaly in app entry point(app.js or smth like that):

global.axios = require('axios')

Leave a comment