[업데이트 2026-10]
- Vue CLI는 유지보수 모드다. 새 프로젝트는
npm create vue@latest로 만드는 Vite 기반 프로젝트를 쓴다. (이후npm install,npm run dev) - 아래의
vue-cli전역 설치와vue init webpack-simple은 Vue 2 시절 방식이다. 기존 프로젝트를 이해할 때 참고하는 기록으로 보면 된다.
* Prerequisite : install node.js
$ npm install vue-cli -global // install vue client
$ mkdir test-vue-project
$ vue init webpack-simple
$ npm install
$ npm run dev
$ vi index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.css">
<link href="https://fonts.googleapis.com/css?family=Ubuntu" rel="stylesheet">
<title>Basic vue index.html</title>
</head>
<body>
<div id="app"></div>
<script src="/dist/build.js"></script>
</body>
</html>