This is follow up to the series of notes on how to open local server on mobile (for simple frontend, for XAMPP). This time it’s about Vite build tool.
Create vite.config.js
config file in your vite project folder with following contents:
export default {
base: '/github-repo-name/',
server: {
host: 'your-local-ip'
}
}
host
- your local IP (type ipconfig in terminal, copy IPv4-address
).
base
this one is for Github deploy with action. Put your repo name here and use action from vite docs.
I wanted to show config with base
property, cause I couldn’t find actual config syntax example with multiple options in official docs)