antfu / vitesse-webext

⚡️ WebExtension Vite Starter Template

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

content script error: TypeError: el.addEventListener is not a function

hirohe opened this issue · comments

in this commit af4f35b and ahead, content script will throw error
before commit af4f35b, content script is functional

seems the output codes addEventListener function is declare in global scope,
and other code will call window.addEventListener

image

I try to lock vite version to "2.5.10" in newest commit's code 8d98f92,
delete node_modules and run pnpm i and npm run build,
and content script is working normally

commented

Could you provide a minimum replication or a more clear and concise description of what the bug is?

The issue can be replicated upon running pnpm start:chromium