Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-study-front-share
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
yifu-study
front
yifu-study-front-share
Commits
9ec353cc
Commit
9ec353cc
authored
May 30, 2022
by
caihaifei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update.
parent
cb7082e3
Pipeline
#16250
failed with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
性能优化--通过优化首屏加载速度实现.md
source/_posts/性能优化--通过优化首屏加载速度实现.md
+12
-1
No files found.
source/_posts/性能优化--通过优化首屏加载速度实现.md
View file @
9ec353cc
## 路由懒加载
---
title
:
性能优化--通过优化首屏加载速度实现
date
:
2022/5/24 14:30
tags
:
-
前端
-
路由懒加载
-
性能优化
author
:
刘磊
---
#### 什么是路由懒加载
路由懒加载也叫延迟加载,即在需要的时候进行加载,随用随载。在单页面应用中浏览器默认会将所有的资源全部下载下来,这可能会导致首屏加载的时间过长。路由懒加载可以做到点击对应的路由再加载对应的文件资源
#### 路由懒加载的三种写法 (推荐用法:es6的import)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment