I am porting a vanilla extension, and the Fetch event for loading scripts fails with the error The FetchEvent for "chrome-extension://*****me.js" resulted in a network error response: the promise was rejected.
Steps to reproduce.
create a ts file that would be the script injected into the page
include the script in the webpack config
include the script in the web-accessible resource key of the manifest
build
let s = document.createElement('script');
s.src = chrome.runtime.getURL("me.js")
s.onload = function () {
//@ts-ignore
this.remove();
};
(document.head || document.documentElement).appendChild(s);
I am porting a vanilla extension, and the Fetch event for loading scripts fails with the error
The FetchEvent for "chrome-extension://*****me.js" resulted in a network error response: the promise was rejected.
Steps to reproduce.