This seems like a really simple question and have searched for an answer, but all the answers are about dynamically loading a remote url.
I have a need to bundle libraries that are published as raw (non-NPM) source in Github. I would like webpack to download and include these files in my bundle. Caching the file locally for a period of time would be a bonus.
For example, I would like to be able to write:
const mylib=require("http://www.espruino.com/modules/ADNS5050.min.js");
And have webpack download and include this js file statically. The bundle is going to be pushed to an embedded device that doesn't have any networking!
Thanks