vscode-apollo-relay icon indicating copy to clipboard operation
vscode-apollo-relay copied to clipboard

Get rid of need for dependencies.ts

Open alloy opened this issue 4 years ago • 2 comments

This is going to go wrong more than once, so we should replace it with something transparent.

The simplest approach looks to be to write code as normal, e.g.:

import { visit } from "graphql"

But then after compiling it we run an additional babel transform or sed script that rewrites it to:

const { visit } = require("./graphql")

…where ./graphql is a module that does the dance to get vscode-apollo’s node_modules.

alloy avatar Sep 10 '19 13:09 alloy