Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Steps to install vuejs3

2025-03-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly explains "the steps of installing vuejs3". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Now let the editor take you to learn the steps of installing vuejs3.

This article operating environment: windows7 system, vuejs3 version, DELL G3 computer.

How to install vuejs3?

Vue3 installation

1. Independent version

We can download the latest version directly from Vue.js 's website and introduce it with tags.

Download Vue.js: https://unpkg.com/vue@3.2.7/dist/vue.global.js

2. Use the CDN method

The following recommend two relatively stable foreign CDN, domestic has not found which one is better, it is still recommended to download to the local.

Staticfile CDN (domestic): https://cdn.staticfile.org/vue/3.0.5/vue.global.js

Unpkg: https://unpkg.com/vue@next, will remain consistent with the latest version released by npm.

Cdnjs: https://cdnjs.cloudflare.com/ajax/libs/vue/3.0.5/vue.global.js

Staticfile CDN (domestic)

{{message}}

Unpkg (recommended)

{{message}}

Cdnjs

{{message}}

3. NPM method

Due to the slow installation of npm, this tutorial uses the image of Taobao and its command cnpm. Reference for installation and use: use the image of Taobao NPM.

The npm version needs to be greater than 3.0. if it is lower than this version, you need to upgrade it:

# View version $npm-v2.3.upgrade npmcnpm install npm-g# upgrade or install cnpmnpm install cnpm-g

It is recommended to use cnpm installation when building large applications with Vue.js. Cnpm works well with Webpack or Browserify module balers:

# the latest stable version $cnpm install vue@next

Command line tool

Vue.js provides an official command-line tool that can be used to quickly build large single-page applications.

# Global installation vue-cli$ cnpm install-g @ vue/cli# View version $vue--version@vue/cli 4.5.11 after installation

Note: vue-cli 3.x and vue-cli 2.x use the same vue command, and if you have previously installed vue-cli 2.x, it will be replaced with Vue-cli 3.x.

Install @ vue/cli-int:

$cnpm I-g @ vue/cli-init

Create a project

$vue init webpack runoob-vue3-test# needs to be configured here. Enter by default? Project name runoob-vue3-test? Project description A Vue.js project? Author runoob? Vue build standalone? Install vue-router? Yes? Use ESLint to lint your code? Yes? Pick an ESLint preset Standard? Set up unit tests Yes? Pick a test runner jest? Setup e2e tests with Nightwatch? Yes? Should we run `npm install` for you after the project has been created? (recommended) npm vue-cli Generated "runoob-vue3-test". # Installing project dependencies...

Enter the project, install and run:

$cd runoob-vue3-test$ cnpm run dev DONE Compiled successfully in 2558ms I Your application is running here: http://localhost:8080

Access http://localhost:8080/ after successfully executing the above command, and the output is as follows:

Note: Vue.js does not support IE8 and the following IE versions.

At this point, I believe you have a deeper understanding of the "steps to install vuejs3". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report