joltup / react-native-threads

Create new JS processes for CPU intensive work
MIT License
756 stars 142 forks source link

Error: Unable to resolve module `./worker.thread` from ``: #125

Open nguyenvanquan7826 opened 3 years ago

nguyenvanquan7826 commented 3 years ago

I try to create two file worker.thread.js with same content.

I call: const thread = new Thread('./worker.thread.js'); from processData.js, but it show error Unable to resolve module ./worker.thread.

Please help me.

martinop commented 3 years ago

same here

h2soheili commented 3 years ago

in release ipa, u can try this thread js bundle resolver

OzymandiasTheGreat commented 3 years ago

For anyone else who runs into this, in dev mode bundler only picks up js files in project root. So just do new Thread("../worker.js").

jayce-incognito commented 2 years ago

same here

jacobp100 commented 2 years ago

I have my index.thread.js in the top level of the project (with the package.json), and just run new Thread('index.thread.js')