You want to move your testPreload.js
file into the data
directory. The self.data
module is actually referencing that directory so the self.data.url()
function gives you a valid URL to the files in that directory. FYI those URLs tend to look like resource://[your-jetpack-id]/data/[file])
Again, just move your: lib/testPreload.js
to data/testPreload.js
and that should fix the problem.