Closed Lamer217 closed 2 years ago
This solved my issue!
// config for the vscode extension "Apollo GraphQL"
module.exports = {
client: {
service: {
name: "rebuild-webapp",
// URL to the GraphQL API
url: process.env.APOLLO_API_URL,
},
// Files processed by the extension
includes: ["src/**/*.js", "src/**/*.vue"],
},
};
Though I understand that this is not an actual bug, particularly not from the side of the extension developers, I hope to get an advice here on how to find a way around it while still using the env variable. And hopefully this helps someone having the same issue in future.
Intended outcome: Successfully use env variable in extension config to reference Apollo link in the backend
Actual outcome: Extension complains about syntax error in the output like so:
How to reproduce the issue: 1) Use Vite + Vue for your front-end. 2) Input this to your apollo.config.js:
Versions v1.19.11