Open capaj opened 7 years ago
A few lines of mokeypatch code that may help with this PR
In exporters-completion-provider.js
add these lines right before let importToken = ex.name
const importPath = fileName.includes('@ncigdc')
? fileName.substr(fileName.indexOf('@ncigdc'), fileName.lastIndexOf('.'))
: relPath;
Replace subsequent references to relPath
with importPath
An example of our file path : "/Users/cheapsteak/gdc/portal-ui/modules/node_modules/@ncigdc/components/Annotation.js"
Replacing '@ncigdc'
with the moduleResolverRoot
variable may satisfy this issue more generally
some people use stuff like babel-plugin-module-resolver with a root set to some dir in the project and they prefer their paths to not start with
./
. For these people, we'll add this options so that you can use this plugin without manually editing the import statement.