I generate static project and deploy in amazon s3, when refresh page I get error:
TypeError: Cannot read property 'defaultClient' of undefined
If my project deploy in node sever it work it.
apollo: { clientConfigs: { default: '~/plugins/apollo-config.js' } },
export default function (context) { return { httpEndpoint: process.env.HTTP_ENDPOINT, getAuth: () => { const token = localStorage.getItem('AUTH_TOKEN') if (token) { return Bearer ${token}} else { return '' } } } }
This question is available on Nuxt community (#c278)
I generate static project and deploy in amazon s3, when refresh page I get error:
TypeError: Cannot read property 'defaultClient' of undefined
If my project deploy in node sever it work it.
apollo: { clientConfigs: { default: '~/plugins/apollo-config.js' } },export default function (context) { return { httpEndpoint: process.env.HTTP_ENDPOINT, getAuth: () => { const token = localStorage.getItem('AUTH_TOKEN') if (token) { returnBearer ${token}} else { return '' } } } }