mirror of
https://github.com/zuiidea/antd-admin
synced 2026-10-27 02:33:45 +00:00
Migrate docs to language-prefixed app routes and split content into zh/en trees, including translated English navigation and pages. Made-with: Cursor
11 lines
414 B
Plaintext
11 lines
414 B
Plaintext
---
|
|
title: 代码分割
|
|
description: 动态 import 与路由懒加载
|
|
---
|
|
|
|
# 代码分割
|
|
|
|
基于 **Vite** 与 **TanStack Router**,可按路由或大屏块使用 **`import()` 动态导入** 实现懒加载,减小首屏 bundle。
|
|
|
|
拆分粒度需在「首屏体验」与「请求次数」之间权衡;后台系统常见做法是对低频管理页做 lazy,对登录后首屏必要依赖保持同步加载。
|