Linux command
vue-serve 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Serve in development mode
vue serve
Serve specific file
vue serve [App.vue]
Serve on custom port
vue serve --port [8080]
Open browser automatically
vue serve --open
说明
vue serve starts a development server with hot-reload for instant prototyping of Vue single-file components without a full project setup. It requires the @vue/cli-service-global package to be installed globally. In Vue CLI v5, the instant prototyping feature was removed and vue serve became an alias for npm run serve. For standalone component prototyping, Vue now recommends using Vite instead.
参数
- -o, --open
- Open browser automatically
- -c, --copy
- Copy local URL to clipboard
- -p, --port _port_
- Port number (default: 8080)
- -h, --host _host_
- Host address (default: 0.0.0.0)
FAQ
What is the vue-serve command used for?
vue serve starts a development server with hot-reload for instant prototyping of Vue single-file components without a full project setup. It requires the @vue/cli-service-global package to be installed globally. In Vue CLI v5, the instant prototyping feature was removed and vue serve became an alias for npm run serve. For standalone component prototyping, Vue now recommends using Vite instead.
How do I run a basic vue-serve example?
Run `vue serve` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -o, --open do in vue-serve?
Open browser automatically