Skip to content

Commit

Permalink
docs(zh): JavaScript (#2625)
Browse files Browse the repository at this point in the history
  • Loading branch information
gekowa authored and posva committed Mar 3, 2019
1 parent a96ea88 commit bd41be0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/zh/guide/advanced/lazy-loading.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 路由懒加载

当打包构建应用时,Javascript 包会变得非常大,影响页面加载。如果我们能把不同路由对应的组件分割成不同的代码块,然后当路由被访问的时候才加载对应组件,这样就更加高效了。
当打包构建应用时,JavaScript 包会变得非常大,影响页面加载。如果我们能把不同路由对应的组件分割成不同的代码块,然后当路由被访问的时候才加载对应组件,这样就更加高效了。

结合 Vue 的[异步组件](https://cn.vuejs.org/v2/guide/components-dynamic-async.html#异步组件)和 Webpack 的[代码分割功能](https://doc.webpack-china.org/guides/code-splitting-async/#require-ensure-/),轻松实现路由组件的懒加载。

Expand Down

0 comments on commit bd41be0

Please sign in to comment.