Location>code7788 >text

Vite build project record

Popularity:548 ℃/2025-01-24 10:42:28

background

WeChat pushed some official account articles, so vite has been updated to version v6, so I built a vite project to see what changes have occurred.

process

Open/Official website, switch to Chinese language, find here/guide/#scaffolding-your-first-vite-projectThe document tells us, execute directly

NPM Create Vite@Latest
 // Before remembering the document for execution
 NPM Create Vite
 // But personal understanding, VITE definitely wants to promote his new version, then simply bring Latest

Then follow the prompts, step by step, as follows

vite 初始化项目截图

The above is basically the construction, the effect in the VSCODE is as follows:

vite构建完项目后预览图

This directory deconstruction feels similar to the v5 version.


Then initialize a project, this time is some options. The process is as follows:

执行 npm-create-vite过程图

When building this time, select the interactive mode that prompts the user to build. Selected vue-router, pinia, prettier, etc. The directory is deconstructed as follows:

选择了一些依赖包后构建效果图

This directory deconstruction is indeed different. There are some differences in the above comparison. Among them, a plug -in, VuedevTools, are reflected in the middle, the page performance effect is as follows:

vueDevTools表现效果

But we don't like it to delete it! as follows:

删除vueDevTools