How to quick test script without copy and paste every time?
vite-plugin-monkey is maybe what you want. It's a vite plugin that supports dev server and hot-reload for userscript.
server
Thanks, i tried that but it only work well on @match webpage, so if i want to create new script for other web i need to create new project each time
// ==UserScript==
// @name local test
// @description local test
// @version -1
// @match https://greasyfork.org/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=greasyfork.org
// @require file:///D:\Desktop\path\to\index.js
// @run-at document-body
// @grant none
// ==/UserScript==
// This is needed, otherwise it is not going to work
(function(){}());
And you also need to allow local files for the extension in the Chrome settings
As an alternative I think you can set up a web server using VS Code extension and @require localhost:3000 or whatever

Hello, im new. I'm very interesting with GM and Tampermonkey and wanna write myself some script, but i dont know how to quick test, like i want to create some script for youtube, facebook,... but each time i changed something i need to copy code from vscode to tampermonkey, then reload 😭😭😭 is there anyway for instant test?