lisonge / vite-plugin-monkey

A vite plugin server and build your.user.js for userscript engine like Tampermonkey, Violentmonkey, Greasemonkey, ScriptCat
MIT License
1.31k stars 70 forks source link

@run-at document-start will fail when in dev mode #73

Closed ZhaoCabin closed 1 year ago

ZhaoCabin commented 1 year ago

when I use some XHR Hook, it must be run at document-start , but In dev mode , it acture run at document-end

how to fix this problem?

lisonge commented 1 year ago

set monkeyConfig.userscript['run-at']='document-start'

or use chrome-remote-interface, the usage is https://github.com/lisonge/vite-plugin-monkey/discussions/60#discussioncomment-5328945

lisonge commented 1 year ago

Is the problem solved now?

ZhaoCabin commented 1 year ago

Is the problem solved now?

Yes, this is the same problem, thank you very much for your help, this helped me a lot, before that I was still frequently using yarn build to develop