[vue/vite]在vscode中使用vite手动创建vue项目

/ 19,159评论 / 66152阅读 / 14点赞

* vite是什么?

* 一个前端的开发构建工具

* 当我们的项目组件变大时,会自觉的分文件、分组件等操作,缩减单文件的大小、增加可维护性,vite则可以帮我们管理,并且它有很多插件帮助我们开发。

初始化

安装vite依赖

安装vue的依赖

创建index.html

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>标题</title>
</head>
<body>
    <!-- 引用的js文件位置 -->
    <script type="module" src=""></script>
</body>
</html>

创建main.js

    <!-- 引用的js文件 -->
    <script type="module" src="./src/main.js"></script>

尝试让它跑起来(1)

创建App.vue

<template>
    <div>
        你好 coolight
    </div>
</template>

在main.js中创建vue,安装vitejs

import { createApp } from 'vue'
import App from './App.vue'

const app = createApp(App)

app.mount('#app')
import { defineConfig } from "vite"
import Vue from "@vitejs/plugin-vue"

export default defineConfig({
    plugins:[
        Vue()
    ]
})

结语

  1. Waynetar说道:

    buying from online mexican pharmacy: mexican border pharmacies shipping to usa – п»їbest mexican online pharmacies

  2. DominicHOr说道:

    mexican drugstore online: buying prescription drugs in mexico – mexico drug stores pharmacies

  3. Lazrhcn说道:

    Привет, друзья!
    Мы изготавливаем дипломы любой профессии по приятным тарифам.
    pumasoccershoesfans.com/read-blog/2056_proverennyj-internet-magazin-s-ogromnym-vyborom-dokumentov

  4. NelsonSaIlk说道:

    mexican drugstore online: medication from mexico pharmacy – mexican pharmaceuticals online

  5. Arnoldscava说道:

    reputable mexican pharmacies online best online pharmacies in mexico mexico drug stores pharmacies

  6. Trefduu说道:

    Привет!
    Покупка диплома о среднем полном образовании: как избежать мошенничества?
    mipropuestadenegocio.com/category/uncategorized/page/3
    Поможем вам всегда!.

  7. Waynetar说道:

    buying prescription drugs in mexico: reputable mexican pharmacies online – mexico drug stores pharmacies

  8. Arnoldscava说道:

    mexico drug stores pharmacies mexican mail order pharmacies mexico pharmacies prescription drugs

  9. Waynetar说道:

    buying prescription drugs in mexico online: best online pharmacies in mexico – pharmacies in mexico that ship to usa

  10. DominicHOr说道:

    mexican rx online: buying prescription drugs in mexico online – mexico pharmacies prescription drugs

  11. DominicHOr说道:

    mexican drugstore online: mexico drug stores pharmacies – п»їbest mexican online pharmacies

  12. Mazrrmk说道:

    Привет, друзья!
    Как быстро и легально купить аттестат 11 класса в Москве
    mans-diplomy.ru

  13. Arnoldscava说道:

    pharmacies in mexico that ship to usa medicine in mexico pharmacies mexican online pharmacies prescription drugs

  14. NelsonSaIlk说道:

    mexico drug stores pharmacies: medication from mexico pharmacy – reputable mexican pharmacies online

  15. Arnoldscava说道:

    mexico drug stores pharmacies purple pharmacy mexico price list mexican mail order pharmacies

  16. Waynetar说道:

    mexico drug stores pharmacies: medicine in mexico pharmacies – mexico drug stores pharmacies

  17. NelsonSaIlk说道:

    buying from online mexican pharmacy: mexican drugstore online – purple pharmacy mexico price list

  18. Arnoldscava说道:

    medicine in mexico pharmacies mexican pharmacy mexican online pharmacies prescription drugs

  19. Promokod_aaOl说道:

    Секретные промокоды – успейте использовать! Секретные промокоды – успейте использовать! .

  20. NelsonSaIlk说道:

    buying prescription drugs in mexico online: best online pharmacies in mexico – buying prescription drugs in mexico

  21. Uazridm说道:

    Привет!
    Заказать диплом о высшем образовании.
    mizunosoccershoesfans.com/read-blog/3329

  22. Waynetar说道:

    mexican mail order pharmacies: mexico drug stores pharmacies – purple pharmacy mexico price list

  23. Arnoldscava说道:

    pharmacies in mexico that ship to usa п»їbest mexican online pharmacies best online pharmacies in mexico

  24. Waynetar说道:

    mexican online pharmacies prescription drugs: pharmacies in mexico that ship to usa – mexican pharmaceuticals online

  25. DominicHOr说道:

    mexican rx online: medication from mexico pharmacy – buying prescription drugs in mexico online

  26. DominicHOr说道:

    medicine in mexico pharmacies: buying from online mexican pharmacy – mexican border pharmacies shipping to usa

  27. Arnoldscava说道:

    purple pharmacy mexico price list mexican pharmaceuticals online mexico pharmacies prescription drugs

  28. NelsonSaIlk说道:

    mexican border pharmacies shipping to usa: mexico drug stores pharmacies – buying from online mexican pharmacy

  29. AlcreditaSag说道:

    Эй! Если срочно нужны деньги, не переживайте. ALL-CREDIT.RU предлагает займы на карту без отказа с плохой кредитной без всяких проверок. Оформление занимает пару минут, а деньги приходят мгновенно. Попробуйте, это реально работает!

  30. Waynetar说道:

    mexico drug stores pharmacies: pharmacies in mexico that ship to usa – mexico drug stores pharmacies

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注