This example demonstrates how to export Swift functions to JavaScript.
-
Build the project:
env JAVASCRIPTKIT_EXPERIMENTAL_BRIDGEJS=1 swift package --swift-sdk $SWIFT_SDK_ID js --use-cdn -
Serve the files:
npx serve
Then open your browser to http://localhost:3000.