Use comlink without vite-plugin-comlink
For some reason the vite-plugin-comlink doesn't seem to work in this constellation. I tried to reproduce in a new vite project and there it did work. But also, the plugin does some horrible magic by replacing a non-existant constructor `ComLinkWorker()` with the `wrap()` method and then the only real benefit is, that we wouldn't need to write the `expose()` method in the worker. So for that reason I'm removing the plugin and using the comlink package directly.
This commit is contained in:
		| @@ -69,7 +69,6 @@ | ||||
|     "@vitejs/plugin-react": "^4.0.2", | ||||
|     "babel-plugin-formatjs": "^10.5.3", | ||||
|     "typescript": "^4.9.5", | ||||
|     "vite": "^4.4.1", | ||||
|     "vite-plugin-comlink": "^3.0.5" | ||||
|     "vite": "^4.4.1" | ||||
|   } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user