Imports other vue components or any other relative files when running bit add ... when the imports are structured as follow:
import SimpleHeader from '@/components/base/SimpleHeader'
import Login from '@/components/authentication/Login'
import UserProfile from '@/components/authentication/UserProfile'
import { HTTP, sureThing } from '@/helpers/http'
@/ stands for src or root kind of like in unix cd ~ it just replaces ../../../helpers and if you move files around the imports are not broken
bit wants to resolve @/components as a node package and not as a relative path.
> authentication/auth-app ... missing dependencies
missing packages dependencies (use your package manager to make sure all package dependencies are installed):
src/components/authentication/AuthApp.vue -> @/components, @/components, @/components
@idealley Thanks for reporting this.
We are still in the process of finding a solution for absolute paths in require statements.
In general, there is 2 concern regarding this:
We are trying to find a good solution which will know to handle all the cases like the described here and in the following issues:
https://github.com/teambit/bit/issues/865
https://github.com/teambit/bit/issues/852
I see! Thank you. I really look forward to it as this is for me the only blocking things to go ahead with Bit.
Did you find any solution?
Yes! We're going to provide an option to configure the alias ("@" in this case) in the bit.json file, and we'll use that configuration to correctly detect the dependencies.
You can follow the PR https://github.com/teambit/bit/pull/980 to get updates.
I believe it'll be merged this week.
Yeah!!! thank you.
Just to keep this post up to date, the feature is merged into master, and some e2e tests were added to make sure Vue files are supported.
It'll be part of the next release, very soon.
hi @idealley , a new version of Bit is finally available, and supports configuring a custom module resolution.
more about it here
Thank you guys. Impressive work. I will try that in details.
Most helpful comment
hi @idealley , a new version of Bit is finally available, and supports configuring a custom module resolution.
more about it here