Closed pacome2017 closed 5 years ago
@pacome2017 what was the solution?
I'm not sure but I think I was missing the custom.d.ts
file. Then paths should be :
import * as WorkerScript from "nativescript-worker-loader!./worker-script";
I say I'm not sure because I ended up redoing my workers following this : https://github.com/NativeScript/worker-loader#web-workers-withwithout-webpack
I use a few workers in my project, I added webpack bundling recently and used the demo-angular in this project to check for the needed changes on workers. I'm blocked on this one : in my worker.service.ts, when I try to import a worker like this
import * as SearchWorker from './search.worker';
then I get an error atconst worker = new SearchWorker();
error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
Or if I try to default import without *
import ConfigWorker from './config.worker';
then I get an errorerror TS1192: Module "..." has no default export
anything on this ?