Skip to content

Dependencies Documentation

Overview

This document details the dependency package management and configuration mechanisms of the VJSP Vue3 framework. The framework adopts modern dependency management strategies to ensure project build stability and development efficiency.

Complete Dependency List

Production Dependencies (dependencies)

Dependency NameVersionRepositoryLicenseBrief Description
@element-plus/icons-vue^2.3.2GitHubMITElement Plus Icon Library
@types/crypto-js^4.2.2GitHubMITCryptoJS Type Definitions
@vueuse/core^12.3.0GitHubMITVue Composition API Utilities
@wangeditor/editor-for-vue^5.1.12GitHubMITVue Rich Text Editor
axios^1.12.0GitHubMITHTTP Request Library
crypto-js^4.2.0GitHubMITEncryption Algorithm Library
dayjs^1.11.13GitHubMITLightweight Date Processing Library
echarts^5.6.0GitHubApache-2.0Data Visualization Library
echarts-wordcloud^2.1.0GitHubBSD-3-ClauseECharts Word Cloud Plugin
element-plus^2.11.7GitHubMITVue 3 UI Component Library
lodash-es^4.17.21GitHubMITJavaScript Utility Library
monaco-editor^0.52.2GitHubMITCode Editor
nprogress^0.2.0GitHubMITPage Loading Progress Bar
path-to-regexp^8.3.0GitHubMITPath Matching Library
pinia^3.0.0GitHubMITVue State Management Library
pinia-plugin-persistedstate^4.2.0GitHubMITPinia State Persistence Plugin
qs^6.13.1GitHubBSD-3-ClauseQuery String Parsing Library
unplugin-auto-import^20.1.0GitHubMITAuto Import Plugin
unplugin-vue-components^29.0.0GitHubMITVue Component Auto Import Plugin
vite-plugin-compression^0.5.1GitHubMITVite Compression Plugin
vite-plugin-html^3.2.2GitHubMITVite HTML Processing Plugin
vue3.5.13GitHubMITVue 3 Core Framework
vue-i18n11.0.1GitHubMITVue Internationalization Solution
vue-router^4.5.0GitHubMITVue Official Router Manager
vue-types^5.1.3GitHubMITVue Component Prop Type Checking

Development Dependencies (devDependencies)

Dependency NameVersionRepositoryLicenseBrief Description
@intlify/unplugin-vue-i18n^6.0.3GitHubMITVue I18n Build Tools
@types/lodash-es^4.17.12GitHubMITLodash ES Type Definitions
@types/node^22.10.5GitHubMITNode.js Type Definitions
@types/nprogress^0.2.3GitHubMITNProgress Type Definitions
@types/path-browserify^1.0.3GitHubMITPath Browserify Type Definitions
@types/qs^6.9.17GitHubMITQS Type Definitions
@typescript-eslint/eslint-plugin^8.19.1GitHubMITTypeScript ESLint Plugin
@typescript-eslint/parser^8.19.1GitHubMITTypeScript ESLint Parser
@vitejs/plugin-vue^5.2.1GitHubMITVite Vue Plugin
@vitejs/plugin-vue-jsx^4.1.1GitHubMITVite Vue JSX Plugin
@vue/runtime-core^3.5.21GitHubMITVue Runtime Core
@vue/tsconfig^0.8.1GitHubMITVue TypeScript Configuration
autoprefixer^10.4.21GitHubMITCSS Auto Prefix Tool
eslint^9.17.0GitHubMITJavaScript/TypeScript Code Linting Tool
eslint-config-prettier^9.1.0GitHubMITESLint Prettier Configuration
eslint-define-config^2.1.0GitHubMITESLint Configuration Definition Tool
eslint-plugin-prettier^5.2.1GitHubMITESLint Prettier Plugin
eslint-plugin-vue^9.32.0GitHubMITVue ESLint Plugin
less^4.2.1GitHubApache-2.0CSS Preprocessor
postcss^8.5.6GitHubMITCSS Processing Tool
prettier^3.4.2GitHubMITCode Formatting Tool
rimraf^6.0.1GitHubISCFile Deletion Tool
rollup^4.30.1GitHubMITJavaScript Module Bundler
rollup-plugin-visualizer^5.14.0GitHubMITRollup Bundle Analysis Tool
tailwindcss^3.4.17GitHubMITUtility-First CSS Framework
typescript5.7.3GitHubApache-2.0TypeScript Compiler
typescript-eslint^8.19.1GitHubMITTypeScript ESLint Toolset
vite6.0.7GitHubMITNext Generation Frontend Build Tool
vite-plugin-ejs^1.7.0GitHubMITVite EJS Template Plugin
vite-plugin-eslint^1.8.1GitHubMITVite ESLint Plugin
vite-plugin-progress^0.0.7GitHubMITVite Build Progress Plugin
vite-plugin-purge-icons^0.10.0GitHubMITVite Icon Cleanup Plugin
vite-plugin-style-import2.0.0GitHubMITVite Style Import Plugin
vite-plugin-svg-icons^2.0.1GitHubMITVite SVG Icon Plugin
vite-plugin-url-copy^1.1.4GitHubMITVite URL Copy Plugin
vite-plugin-vue-devtools^8.0.3GitHubMITVite Vue DevTools Plugin
vue-tsc^2.2.0GitHubMITVue TypeScript Compiler

Core Dependency Architecture

1. Frontend Framework Layer

  • Vue 3.5.13: Core framework providing reactive system and component-based development capabilities
  • Vue Router 4.5.0: Official router management supporting dynamic routing and route guards
  • Pinia 3.0.0: State management library providing type-safe Store management
  • Vue I18n 11.0.1: Internationalization support for multi-language applications

2. UI Component Library

  • Element Plus 2.11.7: Enterprise-level UI component library with rich components and theme customization
  • Element Plus Icons: Icon library containing 2000+ high-quality icons

3. Build Tool Chain

  • Vite 6.0.7: Next-generation frontend build tool providing fast cold start and hot reload
  • TypeScript 5.7.3: Type-safe JavaScript superset
  • Vue TSC: TypeScript type checking for Vue single-file components

4. Development Tools

  • ESLint 9.17.0: Code quality checking tool
  • Prettier 3.4.2: Code formatting tool
  • Vue DevTools: Vue application debugging tool

Dependency Configuration Mechanism

1. Package Management Configuration

The project uses npm as the package manager, with detailed dependency version ranges defined in package.json:

json
{
  "engines": {
    "node": ">=18.0.0 <=22.99.99",
    "npm": ">=8.0.0"
  },
  "browserslist": {
    "production": ["> 1%", "last 2 versions", "not dead"],
    "development": ["last 1 chrome version", "last 1 firefox version", "last 1 safari version"]
  }
}

2. Build Tool Configuration

Vite configuration adopts a plugin-based architecture for modular functionality:

  • Auto Import Plugin: Automatically imports commonly used APIs like Vue, Vue Router, Element Plus
  • Component Auto Registration: Automatically scans and registers components in the src/components directory
  • Internationalization Plugin: Supports automatic configuration and type safety for Vue I18n
  • SVG Icons: Automatically processes SVG icons with on-demand loading support

3. Type Checking Configuration

TypeScript configuration uses strict mode to ensure code quality:

json
{
  "compilerOptions": {
    "target": "ES2022",
    "strict": true,
    "moduleResolution": "Node",
    "paths": { "@/*": ["src/*"] }
  }
}

Dependency Classification Explanation

1. Production Dependencies (dependencies)

Core Framework

  • vue, vue-router, pinia: Vue ecosystem core libraries
  • element-plus: UI component library
  • axios: HTTP request library
  • vue-i18n: Internationalization support

Feature Enhancement

  • @vueuse/core: Vue Composition API utilities
  • lodash-es: Utility function library
  • dayjs: Date processing library
  • crypto-js: Encryption tool library

Editors and Visualization

  • monaco-editor: Code editor
  • echarts: Chart visualization library
  • @wangeditor/editor-for-vue: Rich text editor

2. Development Dependencies (devDependencies)

Build Tools

  • vite and related plugins: Build toolchain
  • @vitejs/plugin-vue: Vue single-file component support
  • vue-tsc: Vue type checking

Code Quality

  • eslint and related plugins: Code linting
  • prettier: Code formatting
  • typescript: TypeScript compiler

Style Processing

  • less: CSS preprocessor
  • tailwindcss: Utility-first CSS framework
  • autoprefixer: CSS auto prefixing

Product Module Development Example

1. Dependency Import Configuration

In Product module development, dependencies need to be properly configured:

typescript
// product/services/productApi.ts
import { axios } from 'axios'
import { ElMessage } from 'element-plus'
import { dayjs } from 'dayjs'

// Product API service encapsulation
export class ProductApiService {
  // API interface definition and implementation
}

2. Component Dependency Management

Product components need to correctly declare dependencies:

vue
<!-- product/components/ProductList.vue -->
<template>
  <el-table :data="productList">
    <el-table-column prop="name" label="Product Name" />
    <el-table-column prop="price" label="Price" />
  </el-table>
</template>

<script setup lang="ts">
import { ref, onMounted } from 'vue'
import { ElTable, ElTableColumn } from 'element-plus'
import { useProductStore } from '@/stores/product'

const productStore = useProductStore()
const productList = ref([])

onMounted(async () => {
  productList.value = await productStore.fetchProducts()
})
</script>

3. Type Definition Dependencies

Product module type definitions:

typescript
// product/types/product.ts
export interface Product {
  id: number
  name: string
  price: number
  description: string
  createdAt: string
}

Dependency Version Management Strategy

1. Version Range Strategy

The framework adopts a balanced version management approach:

  • Major versions: Use caret (^) for backward-compatible updates
  • Minor versions: Use tilde (~) for bug fixes and minor updates
  • Critical dependencies: Use exact versions for stability

2. Security Updates

Regular dependency security scanning and updates:

bash
# Check for security vulnerabilities
npm audit

# Fix security issues
npm audit fix

# Update dependencies
npm update

3. Performance Optimization

Dependency optimization strategies:

  • Tree shaking: Remove unused code through build optimization
  • Code splitting: Split code into smaller chunks for faster loading
  • Lazy loading: Load dependencies on-demand to reduce initial bundle size

Best Practices

1. Dependency Management

  • Regularly update dependencies to get security patches and performance improvements
  • Use dependency locking (package-lock.json) to ensure consistent installations
  • Monitor dependency licenses to ensure compliance

2. Build Optimization

  • Configure Vite plugins for optimal build performance
  • Use CDN for large dependencies when appropriate
  • Implement proper caching strategies for build artifacts

3. Development Workflow

  • Use proper import statements to avoid bundle bloat
  • Implement proper error boundaries for dependency failures
  • Monitor bundle size and performance metrics regularly

This comprehensive dependency management approach ensures the VJSP Vue3 framework remains stable, secure, and performant throughout the development lifecycle.