Swift Package: Library Name vs Target Name

If my library name were A, and the target included's name is B, even then, in Xcode, I can do import A, but then when I try to build the compiler raise an error "no such module A".

To clarify the library cannot be imported directly, and I can only import the Target(s) of the library?