惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Attack and Defense Labs
Attack and Defense Labs
T
Threatpost
C
Cybersecurity and Infrastructure Security Agency CISA
H
Hackread – Cybersecurity News, Data Breaches, AI and More
I
Intezer
C
Cyber Attacks, Cyber Crime and Cyber Security
The Register - Security
The Register - Security
量子位
Security Latest
Security Latest
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
大猫的无限游戏
大猫的无限游戏
小众软件
小众软件
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
C
CXSECURITY Database RSS Feed - CXSecurity.com
MyScale Blog
MyScale Blog
J
Java Code Geeks
Apple Machine Learning Research
Apple Machine Learning Research
Google DeepMind News
Google DeepMind News
WordPress大学
WordPress大学
Spread Privacy
Spread Privacy
Jina AI
Jina AI
博客园 - 【当耐特】
P
Palo Alto Networks Blog
Last Week in AI
Last Week in AI
SecWiki News
SecWiki News
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
G
GRAHAM CLULEY
宝玉的分享
宝玉的分享
Hacker News - Newest:
Hacker News - Newest: "LLM"
T
The Blog of Author Tim Ferriss
V
Vulnerabilities – Threatpost
有赞技术团队
有赞技术团队
T
Tor Project blog
H
Hacker News: Front Page
A
Arctic Wolf
NISL@THU
NISL@THU
A
About on SuperTechFans
云风的 BLOG
云风的 BLOG
Engineering at Meta
Engineering at Meta
V
V2EX
N
News and Events Feed by Topic
Webroot Blog
Webroot Blog
Know Your Adversary
Know Your Adversary
P
Privacy International News Feed
I
InfoQ
D
Docker
L
LINUX DO - 最新话题
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
U
Unit 42

博客园 - Ratooner

.NET7 IOC注册SqlSugar .NET 7.0 Program.cs访问appsettings.json配置文件 vite学习笔记 vue3 el-image图片资源的使用 bootstrap.bundle.min.js bootstrap.bundle.min.js.map 404报错 js中===和==的区别 json-server 笔记 openstack heat 实验笔记 openstack neutron 实验笔记 openstack nova 实验笔记 openstack glance 实验笔记 openstack keystone 实验笔记 Vue 中npm run dev 和 npm run serve 的区别 Flask+Vue 使用 vue 学习笔记1 vue export学习笔记1 GRE和VXLAN的区别 openstack各组件逻辑关系图(转载) openstack创建云主机流程图(转载)
vue3创建项目笔记
Ratooner · 2023-04-06 · via 博客园 - Ratooner

******使用vite方式创建应用

E:\vue3学习>npm init vite@latest vite-blog -- --template vue
Need to install the following packages:
create-vite@4.2.0
Ok to proceed? (y) y

Scaffolding project in E:\vue3学习\vite-blog...

Done. Now run:

cd vite-blog
npm install
npm run dev

npm notice
npm notice New minor version of npm available! 9.5.0 -> 9.6.4
npm notice Changelog: https://github.com/npm/cli/releases/tag/v9.6.4
npm notice Run npm install -g npm@9.6.4 to update!
npm notice

E:\vue3学习>cd vite-blog

E:\vue3学习\vite-blog>npm install
npm WARN deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead

added 32 packages, and audited 33 packages in 45s

5 packages are looking for funding
run `npm fund` for details

found 0 vulnerabilities

E:\vue3学习\vite-blog>

创建完成后可以将vite-blog拖拽至vs code进行编辑。

**************使用脚手架创建应用

npm i -g @vue/cli  //安装@vue/cli 脚手架

vue create test  //创建test app

***************vite创建应用

npm install -g create-vite-app  //安装vite

create-vite-appreat vue3-vite //创建vite应用

cd vue3-vite 

npm install

npm run dev

pnpm方式

pnpm create vite 

******************安装typescript 支持

npm  add typescript -D  //安装typescript

PS E:\newsvn\vue3学习\vue3-vite> npx tsc --init  //在vscode终端运行

 shim.d.ts 文件内容

declare module "*.vue" {

    import { Component } from "vue";

    const component:Component

    export default component;

}

**********安装支持sass

PS E:\newsvn\vue3学习\vue3-vite> npm add sass sass-loader -D

安装后检查package.json文件

  "devDependencies": {

    "@vue/compiler-sfc": "^3.0.4",

    "sass": "^1.62.0",  //安装后的提示

    "sass-loader": "^13.2.2", //安装后的提示

    "typescript": "^5.0.4",

    "vite": "^1.0.0-rc.13"

  }