DEV Community

Muhamad Jamil
Muhamad Jamil

Posted on

3 1

Preview vue.js app in android

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

in package.json file in your app, add this command

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

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

vite will automatically use your ip as a server ip, then run the command with npm 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 github issue

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

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs