Vue CLI
๐ ๏ธ Standard Tooling for Vue.js Development
Categories
Installation
๋ด๊ฐ ์ฌ์ฉํ๋ ๋ฐฉ๋ฒ
์ ์ญ์ ์ค์นํ์ง ์๊ณ ๋ก์ปฌ์ ์ค์นํ์.
yarn init -y # ๋ฌผ์ด๋ณด๋ ๊ณผ์ ์ด ํ์ํ๋ฉด -y ์ต์
์ ๊ฑฐ
yarn add -D @vue/cli
yarn vue create .
yarn remove @vue/cli
rm -rf node_modules
yarn
Upgrade
์ต์ ๋ฒ์ ์ ๊ธฐ์กด ๋ฒ์ ์ ์ ๊ฑฐํ๊ณ ๋ค์ ์ค์นํด์ผ ํ๋ค.
๋ฐฐํฌ์ Sub-path ์ ์ฉ ๋ฐฉ๋ฒ
publicPath
์์ฑ์ ์์ ํ๋ฉด ๋๋ค. ์ด ์์ฑ์ ๊ธฐ๋ณธ๊ฐ์ด '/'
์ด๋ค.
module.exports = {
publicPath: process.env.NODE_ENV === 'production'
? '/production-sub-path/'
: '/'
}
Browser Compatibility
Configuration Reference
vue.config.js ํญ๋ชฉ ์ฐธ์กฐ.
์ค์น ์ต์ ๋น๊ต
์ค์น ์ต์ ์ ๋ฐ๋ฅธ package.json ํ์ผ์ ๋ณํ๋ฅผ ์ ๋ฆฌํ๋ค.
Project Template
- vue2, babel, eslint, typescript, vue-router, vuex
- vue2, babel, eslint, typescript, vue-router, vuex, sass
- vue2, babel, eslint, typescript, vue-router, vuex, sass, jest
- vue2, babel, eslint, typescript, vue-router, vuex, sass, jest, cypress
- vue2, babel, eslint, typescript, vue-router, vuex, sass, jest, cypress, pwa
Only Vue
- Vue:ProjectTemplate:Vue2 ํญ๋ชฉ ์ฐธ์กฐ.
See also
- vue
- vue-loader
- Boilerplate code (Scaffold)