I created a simple object similar to the example:
import { expose } from 'comlink'
export const SortWorker = {
hello: 'world',
sort() {
return 'sort worker ran!'
},
}
expose(SortWorker)
But I see this in the console: Uncaught SyntaxError: Unexpected token '<'
I am using create-react-app with hooks.
I created a simple object similar to the example:
But I see this in the console:
Uncaught SyntaxError: Unexpected token '<'I am using create-react-app with hooks.