I'm trying to migrate an extension from manifest V2 to V3 and I've encountered an issue. In my extension I am loading a local file by listing the filename in the "web_accessible_resources" section of the manifest, then "fetch"-ing that resource after getting it's URL with "chrome.runtime.getURL".
If we pretend the file is called "data.txt" then the problematic section of code looks something like this:
data = fetch(chrome.runtime.getURL("data.txt")).then(response => response.text())
However, I am no longer able to use "fetch" to retrieve my local file (I think because "fetch" has been limited to prevent loading remote-code). Any ideas how I can circumvent this issue in manifest V3?