I have added swipl-wasm package to NPM after being requested countless times. https://www.npmjs.com/package/swipl-wasm
I had bigger plans at first to add Typescript support, lots of tests and examples but currently this package contains the minimal number of things.
You get the original build output files in dist/swipl
directory. The files are built using Docker which should make it much easier for people using Windows. The package already contains built files so you don’t need any build tools at all unless you want to experiment with different build options.
Check https://swi-prolog.discourse.group/t/swi-prolog-in-the-browser-using-wasm/5650 for any advanced usage. Besides 2 runnable examples there is no documentation in the package at all.
The package should probably be versioned in lockstep with main SWI-Prolog releases. @jan can publish new versions of the package. The package files (scripts etc.) should maybe be part of the SWI-Prolog repo.
Edit: package own source code is currently here: https://github.com/rla/npm-swipl-wasm