小技巧
推荐vscode插件
.vsconde/extensions.json
{
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
// List of extensions which should be recommended for users of this workspace.
"recommendations": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"octref.vetur",
"editorconfig.editorconfig",
"syler.sass-indented",
"sysoev.language-stylus",
"gruntfuggly.todo-tree"
],
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
"unwantedRecommendations": []
}
实用工具
nrm
包可以方便切换npm包的多个registry源nvm
包可以方便切换node的多个版本
实用组件
- 编译打包内存溢出时。
输出v8内存 const v8 = require('v8') console.log(v8.getHeapStatistics())
扩大v8内存 本地项目package.json
"script":{
"increase-memory-limit": "cross-env LIMIT=9000 increase-memory-limit"
}
如果是jenkins构建,则执行命令配置如下即可:
export NODE_OPTIONS="--max-old-space-size=4096"
实用插件
- vite-plugin-vue-docs 或vite-plugin-vuedoc 组件库文档插件