Open alloy opened 5 years ago
I just recalled that I wrote this codemod before https://github.com/artsy/codemods/blob/master/src/update-import-source.ts, which we should be able to re-use for this purpose.
I started on a branch here https://github.com/relay-tools/vscode-apollo-relay/tree/fix-dependency-hell but haven't gotten it to work yet.
@kastermester feel free to take a stab at it, if you wish.
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.:
But then after compiling it we run an additional babel transform or sed script that rewrites it to:
…where
./graphql
is a module that does the dance to get vscode-apollo’s node_modules.