Qiankun Vite Test

screenshot of Qiankun Vite Test

技术站: vue3+vite+qiankun+lenar,父应用 vue3(vite),子应用用 vue(webpack) 和 vue3(webpack)和vue3(vite), 可以稍加修改作为中小型应用模板

Overview

The Qiankun framework, integrating experiences from various Vue applications, offers a robust solution for managing micro-frontend architectures. This practice demo combines a parent application built with Vue 3 and Vite, along with child applications using both Vue (Webpack) and Vue 3 (Webpack/Vite). It provides insights into the strengths of micro-frontend architecture, particularly how it allows for smooth integration of older systems with newer technologies while maintaining a clear separation of concerns.

The design philosophy behind Qiankun emphasizes ease of development and deployment. With Vite’s fast hot module replacement, developers can push updates almost instantly, enhancing their workflow. Qiankun enables new modules to leverage modern advancements without the need to overhaul existing projects, making it a promising choice for both legacy and greenfield projects.

Features

  • Fast Development Environment: The parent application utilizes Vite for near-instant updates, significantly improving development speed and efficiency.

  • Qiankun Plugin for Vite: Child applications require the installation of vite-plugin-qiankun, allowing them to integrate seamlessly with the parent app, though currently, Vite lacks official support for child applications without this plugin.

  • Single Command Setup: Quickly install all dependencies and start all applications with a single command, simplifying the initial setup process.

  • Micro-Frontend Architecture: Qiankun supports both old and new engineering projects, allowing for gradual transitions to modern tech stacks without disrupting existing workflows.

  • Flexible Resource Management: Offers methods to manage resources and assets across applications efficiently, such as leveraging path proxies to handle image sourcing and prevent loading issues.

  • Parent-Child Communication: Implements a consistent communication format between the parent and child components to reduce redundancy and enhance maintainability.

  • Nginx Configuration Support: Provides detailed recommendations for setting up Nginx to serve micro-frontends, ensuring that both the parent and child applications can operate smoothly.

  • Debugging Tips: Documentation highlights common pitfalls and solutions encountered during development, helping teams quickly troubleshoot issues related to routing, resource loading, and state management.

eslint
Eslint

ESLint is a linter for JavaScript that analyzes code to detect and report on potential problems and errors, as well as enforce consistent code style and best practices, helping developers to write cleaner, more maintainable code.