async-task icon indicating copy to clipboard operation
async-task copied to clipboard

Handling dependencies inside AsyncTask

Open Heedster opened this issue 9 years ago • 1 comments

How can I invoke a function defined in another module from inside AsyncTask. Whatever I require outside seems to be undefined inside. How can I require something inside?

Heedster avatar Oct 09 '16 14:10 Heedster

If its webworker you have to use the webworker internal API for importing scripts: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers#Importing_scripts_and_libraries

If you are using it in nodejs you use the standard require('foo/bar')

yornaath avatar Oct 15 '16 02:10 yornaath