Bug-fix release for 0.9.0.
Fixed
0.9.0 implemented the preview surface with @_exported import WebKit and @_exported import DeveloperToolsSupport. Those leaked through any package that re-exports SwiftHTML — for example a server runtime that does @_exported import SwiftHTML — and broke unrelated type lookups downstream (e.g. 'WebSocket' is ambiguous in a Vapor-based package).
The #Preview macro expansion now names only SwiftHTML SPI (_HTMLPreviewRegistry, _HTMLPreviewValue, _makeHTMLPreview), so WebKit and DeveloperToolsSupport stay regular (non-exported) imports inside SwiftHTML and nothing leaks. import SwiftHTML alone still writes a preview:
import SwiftHTML
#Preview {
main { h1 { "Hello" } }
}Install
.package(url: "https://github.com/1amageek/swift-html.git", from: "0.9.1"),