Module exports
zakanybalazs opened this issue · comments
Hi I have already tried many ways of doing this, but always get the same error:
- "export 'User' was not found in '@/accessers/ac_user.js'
@/accessers/ac_user.js
import fireconf from '~/firebase_conf.json';
module.exports = {
User: (type, value) => {
switch (type) {
case 'uid':
return axios.get(fireconf.getuser.uid.url);
case 'email':
return axios.get(fireconf.getuser.email.url);
}
}
}
Index.vue
import {User} from '@/accessers/ac_user.js';
nuxt.config.js
modules: [
'~/accessers/ac_user.js'
],
Also I have included in package.json the "babel-polyfill", because that's supposed to help. (it didn't)
Am I missing something?