You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import { ApolloClient, HttpLink, InMemoryCache } from '@apollo/client/core'
import { createApolloProvider } from '@vue/apollo-option'
import { DefaultApolloClient } from '@vue/apollo-composable'
const httpLink = new HttpLink({
// You should use an absolute URL here
uri: 'http://localhost:3000',
})
// Create the apollo client
const apolloClient = new ApolloClient({
link: httpLink,
cache: new InMemoryCache()
});
const apolloProvider = createApolloProvider({
defaultClient: apolloClient,
})
const app = createApp(App)
.provide(DefaultApolloClient, apolloProvider)
...
// Error after compile
INFO Starting development server...
[vue-cli-service] error in ./node_modules/@vue/apollo-composable/dist/index.esm.js
[vue-cli-service] Module parse failed: Unexpected token (19:103)
[vue-cli-service] You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
[vue-cli-service] | var ApolloClients = Symbol("apollo-clients");
[vue-cli-service] | function resolveDefaultClient(providedApolloClients, providedApolloClient) {
[vue-cli-service] > const resolvedClient = providedApolloClients ? providedApolloClients.default : providedApolloClient ?? void 0;
[vue-cli-service] | return resolvedClient;
[vue-cli-service] | }
[vue-cli-service] @ ./src/main.ts 26:0-61 41:35-54
[vue-cli-service] @ multi (webpack)-dev-server/client?http://192.168.0.119:8100&sockPath=/sockjs-node (webpack)/hot/dev-server.js ./src/main.ts
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Error use apollo-composable
Beta Was this translation helpful? Give feedback.
All reactions