-
Notifications
You must be signed in to change notification settings - Fork 936
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
module imports without dots are not resolved #865
Comments
Hi @sonaba Also, it's worth to know, that once you export bit component to a remote scope (or import a component from remote scope), you can require it using an absolute path without the need of anything else like NODE_PATH / webpack resolve and so on. Anyway, I'll keep this issue open and updated. |
thanks for the quick response. yes NODE_PATH support will be fine. |
Any luck on the NODE_PATH support? :) |
Yes! We're going to provide an option to configure alias and resolve folders (in a similar way to webpack resolve) in the bit.json file, and we'll use that configuration to correctly detect the dependencies. |
Nice work! Really like what you guys are doing with bit. |
a new version of Bit is available and supports this feature. more details here. |
Thank you @itaymendel |
hi @manufont , i'll add a few more details and explanations around it... but basically this is what you want to configure - you need to add an array to of paths called 'modulesdirectories' to the 'resolvemodules' object in the i understand why the current writeup in the docs may be confusing. an update to the docs will be posted later today. "resolveModules": {
"modulesDirectories": ["src"]
} https://docs.bitsrc.io/docs/conf-bit-json.html#resolvemodules--object |
I just figured it out. Thanks 🙂 |
if im using dependency pathnames without dots i get "missing packages dependencies" error on "bit status".
u can find info about importing modules without dots:
https://medium.com/@ktruong008/absolute-imports-with-create-react-app-4338fbca7e3d
https://jaketrent.com/post/import-js-module-without-dot-dot-slash/
https://stackoverflow.com/questions/45213279/how-to-avoid-using-relative-path-imports-redux-action-action1-in-cre
The text was updated successfully, but these errors were encountered: