If there is no background interaction involved, you can directly run npm run dev locally during development, so that the local access localhost:8080 is the actual effect (the default is to mount port 8080 with hot update). When you submit to GitHub, run npm run build locally and a dist folder will be generated. Just submit the dist folder.
Obviously you have to build it before you can preview it.
1. Directly transfer the dist to github, and then access it using cdn. Such as this
2. Build a server yourself and deploy the output after the build.
For purely static purposes, you can use github pages
If there is no background interaction involved, you can directly run
npm run dev
locally during development, so that the local accesslocalhost:8080
is the actual effect (the default is to mount port 8080 with hot update). When you submit to GitHub, runnpm run build
locally and a dist folder will be generated. Just submit the dist folder.Use github pages directly