We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8117adc commit 97c58bfCopy full SHA for 97c58bf
packages/babel-plugin-relay/createModernNode.js
@@ -12,7 +12,6 @@
12
'use strict';
13
14
const crypto = require('crypto');
15
-const fs = require('fs');
16
const path = require('path');
17
18
const {print} = require('graphql');
@@ -131,7 +130,8 @@ function getRelativeImportPath(
131
130
path.resolve(artifactDirectory),
132
);
133
134
- const relativeReference = relative.length === 0 ? './' : '';
+ const relativeReference =
+ relative.length === 0 || !relative.startsWith('.') ? './' : '';
135
136
return relativeReference + path.join(relative, fileToRequire);
137
}
0 commit comments