Replace ./ import by @lib/ using Babel resolver#50
Replace ./ import by @lib/ using Babel resolver#50tschaffter wants to merge 1 commit intoga4gh:developfrom
Conversation
|
i'm happy to do a review of this if you'd like |
Currently we have in webpack.config.js: First, I think that it is confusing to use the prefix "@" for aliases since this is also the prefix for npmjs organization like "@sentinel-one/ui-compodoc". Second, we are currently using webpack to define the alias. In #50, @jaeddy proposes to use the Babel plugin "babel-plugin-module-resolver". At the same time, I think that @jb-adams implemented the current solution that uses webpack aliases. The article shared by @jaeddy in #50 comment on this:
We currently do not depend on the advantage mentioned by the author for the webpack solution. However, I think that there is an advantage to use the babel plugin approach: enabling developers to import Proposal:
|
Sounds good to me. I wasn't aware that babel resolvers could do this (was only familiar with webpack resolvers). +1 for using babel instead of webpack |
This PR aims to fix #27.
This PR replaces all relative import by absolute imports using
@lib/.npm run buildandnpm run testcompletes successfully.