I am developing a package of Swift Package Manager where SwiftUI views need to be included.
Every SwiftUI view should have a preview.
However, when I try to run a preview of any view I get the following error:

I found a way where if I change the package scheme to the main target scheme it becomes work. But using this way I have to switch between schemes all the time and the main target needs to be built every time I want to run a preview of a package.
Is it possible to run SwiftUI preview somehow directly from SPM Package without building the main target?

