Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Muhamad Jamil
Muhamad Jamil

Posted on

     

Preview vue.js app in android

First you need to ensure that your device is in same network

inpackage.json file in your app, add this command

"host": "vite --host" or use your own name, im usinghost for command name. you can change the setting insidevite.config.js too with this setting

  server: {    host: true  }
Enter fullscreen modeExit fullscreen mode

vite will automatically use your ip as a server ip, then run the command withnpm run host, and finally you can access your app in external device, just access it with{your ip}:{your app port} eg:192.168.10.1:3000.

Thanks for this githubissue

if you have another method feel free to discuss, thanks for reading

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

Junior Frontend Developer | Vue Js | Blockchain Enthusiast
  • Location
    Indonesia
  • Joined

More fromMuhamad Jamil

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp