vuejs啟動專案的方法:1、安裝node.js;2、安裝「@vue/cli」;3、使用「vue create 專案名稱」指令建立一個專案;4、使用cd指令進入vue專案目錄中;5、執行「npm run serve」指令啟動專案。

本教學操作環境:windows7系統、vue2.9.6版,DELL G3電腦。
前提條件:安裝node.js
啟動vue專案
- 如果想要啟動vue項目,有兩種方式,第一種使用@vue/cli,第二種使用webpack從零開始搭建Vue專案;如果你是新手的話,建議你使用@vue/cli這個工具,cli是封裝了webnpack的loader與plugin,能夠使你快速啟動vue專案;我以下就是使用的@vue/cli;
- 進入官網https://cli.vuejs.org/zh/
- 安裝@vue /cli
npm install -g @vue/cli
- 檢視@vue/cli版本號碼
vue --version
-
vue create hello-world
建立一個專案

選擇手動選擇

##選擇babel ,css pre-processors,linter,unit testing,選擇後按回車









#################################################################################### ###cd hello-world $ npm run serve### 輸入此指令######################開啟http://localhost:8080/ 出現下列頁面,說明建立並啟動專案成功##################相關推薦:《###vue.js教學###》###
以上是vuejs開發如何啟動專案的詳細內容。更多資訊請關注PHP中文網其他相關文章!