Closed nomi-san closed 1 year ago
Not sure what the solution would be for dev builds like your code snippet implies. But there may be a way to generate self contained bundles for content scripts that have run_at set to document_start so they're guaranteed to load synchronously.
One possible workaround until then would be to ensure the code that you need to run at document_start is in its own content script that's not using any imports.
I found the generated content script index:
So my content script is injected asynchronously, sometimes it's initialized after DOM although "run_at" prop is set to
document_start
.