im writing my own javascript library at the moment and want to permanently import it to the microsoft edge devtools console (or devtools in general), to use it there,but i dont know how to import it
thanks in advance, -Gzrespect
CodePudding user response:
If you don't have a local server, get one at https://chrome.google.com/webstore/detail/web-server-for-chrome/ofhbbkphhbklhfoeikjpcbhemlocgigb/ and set up a folder to serve.
set CORS in advanced server settings to allow importing it on most websites
use
let myModule = await import('http://127.0.0.1:8887/myModule.ts')
to import it
note: that should be ES module (with imports if there are multimple files) and not CJS module (with requires)