git.iko.soy/rowtype-yoga/purescript-web-proletarian
on main help sign in
Update README.md
commite083d20566a60e59c95d90119ffb2b29821076a4 authorMark Eibes <mark.eibes@gmail.com> dateThu 17 Nov 2022, 10:32 (4 years ago) parent3eeeda4
1 file changed+2−2
README.md+2−2
README.md+2−2
@@ -32,7 +32,7 @@ foreign import newWorker ∷ Effect (Worker Int String)
3232
3333### Write a correspoding FFI file with the import
3434With an FFI file that your bundler understands:
35−```purs
35+```js
3636export const newWorker = () => new Worker(new URL("../../workers/echo.worker.js", import.meta.url))
3737```
3838
@@ -46,7 +46,7 @@ This means you should have the bundled version of this worker in: `/workers/echo
4646
4747You can achieve this with spago by telling it to use your worker module as the Main method:
4848
49−```
49+```sh
5050spago bundle-app -m Worker.Echo --to /workers/echo.worker.js
5151```
5252