Excuse me.How to import third-party library files in the worker
Hi @smartmango! To import third-party libraries, you’ll need to use a tool like Browserify or Webpack, then upload the entire bundled script as your worker. This will increase the size of your script substantially, but scripts can be up to 1MB in size, which should be enough to accomplish quite a bit.
To get you started, I can recommend a blog post that Simon Thompson put together a little while ago: he shows how to modify HTML content in a worker using Cheerio (a server-side jQuery implementation) which is imported using Browserify. You’ll probably find it helpful:
OK. Thank you very much!