You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This project uses a custom "hasteResolver" defined in build_helpers\resolvers.js to allow simplified imports like import FixedDataTableStore from 'FixedDataTableStore'; instead of relative imports like import FixedDataTableStore from './FixedDataTableStore';
While this works, as a newcomer to the project I found it unintuitive and confusing. Also, my IDE can't understand the webpack resolution behavior, and is constantly warning me that it can't find these modules.
I'm curious about the decision not to use relative imports, and am wondering whether you'd be open to a PR to remove the custom resolver in favor of relative imports.
The text was updated successfully, but these errors were encountered:
I'd be open to a fix to use relative imports. It was this way when forked from FBook, but I agree, it's not as good as following the JS standards of relative imports. @pradeepnschrodinger do you have any concerns?
Nope, relative imports sounds good.
Also how good/bad are absolute imports (which we use in LD) in comparison to relative?
I find absolute imports easier to copy and paste, and sometimes also to read. But besides that, I'm fine with both.
Hi @boxfoot ,
We're open to your suggestion to not use the haste resolver, and instead make use of relative/absolute imports everywhere.
Do you have a PR in mind?
This project uses a custom "hasteResolver" defined in
build_helpers\resolvers.js
to allow simplified imports likeimport FixedDataTableStore from 'FixedDataTableStore';
instead of relative imports likeimport FixedDataTableStore from './FixedDataTableStore';
While this works, as a newcomer to the project I found it unintuitive and confusing. Also, my IDE can't understand the webpack resolution behavior, and is constantly warning me that it can't find these modules.
I'm curious about the decision not to use relative imports, and am wondering whether you'd be open to a PR to remove the custom resolver in favor of relative imports.
The text was updated successfully, but these errors were encountered: