Skip to content
Search

Vue CLI

lastmod 2022-04-21created 2018-09-0230 edits

🛠️ Standard Tooling for Vue.js Development

Categories

Installation

npm install -g @vue/cli
# OR
yarn global add @vue/cli

The way I do it

Install locally instead of globally.

yarn init -y  # 물어보는 과정이 필요하면 -y 옵션 제거
yarn add -D @vue/cli
yarn vue create .
yarn remove @vue/cli
rm -rf node_modules
yarn

Upgrade

For the latest version, you need to remove the existing version and reinstall.

$ npm uninstall -g vue-cli
$ npm install -g @vue/cli

Applying a sub-path on deployment

Modify the publicPath property. Its default value is '/'.

module.exports = {
  publicPath: process.env.NODE_ENV === 'production'
    ? '/production-sub-path/'
    : '/'
}

Browser Compatibility

Configuration Reference

See vue.config.js.

Comparison of installation options

A summary of how the package.json file changes depending on the installation options.

Project Template

Only Vue

See also

Favorite site

author Zer0 sitemap