Amin Ya

Results 1114 comments of Amin Ya

@andywer It works for me locally. It says `getWorkerImplementation` is not exported while it is! This is weird.

> Thanks, @aminya. Need to sleep about it, though. > > The issue is that this solution will only work in node.js, it won't work with webpack or parcel bundler....

I am OK with not exporting `createWorker` from the index. BTW, tsconfig-esm is configured for es2015 which is not a good compiler source e.g.: it converts awaits to yield. We...

> Sorry, @aminya. Was super busy the last few days… No worries! > Yeah, maybe it's time to target a more up-to-date JS runtime like ES2017. This tsconfig.json has been...

@andywer I rebased this, and in the next commit, I removed `createWorker` export from index:

I added some unit tests, but the code is super fragile. The resolved worker path depends on which file I import (`../src/createWorker` vs `../createWorker`). Also, using an absolute path doesn't...

So for creating the webworker directly, you can do this: ```js import * as BrowserImplementation from "threads/dist/master/implementation.browser" const implementation = BrowserImplementation getWorkerImplementation = implementation.getWorkerImplementation const Worker = getWorkerImplementation().default ``` This...

This issue was done in #290. However, it was never merged to master. If you need it, I can register my fork so you can use it.