Swift Package and SwiftUI Previews: are PreviewProviders automatically removed when the package is compiled?

When using SwiftUI Previews in a Swift Packages, are PreviewProviders automatically removed from the package when archiving an app, as it is the case with a app, or not?

If not, how to deal with that? I’m not sure we can use compiler directives like if DEBUG in packages, can we?

Swift Package and SwiftUI Previews: are PreviewProviders automatically removed when the package is compiled?
 
 
Q