Skip to content

Commit a65ed68

Browse files
wizardofhogwartsEugeneHlushko
authored andcommitted
docs: improve docs (#2891)
1 parent 23f1d57 commit a65ed68

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/content/guides/code-splitting.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ contributors:
2626
- EugeneHlushko
2727
- Tiendo1011
2828
- byzyk
29+
- wizardofhogwarts
2930
related:
3031
- title: <link rel=”prefetch/preload”> in webpack
3132
url: https://medium.com/webpack/link-rel-prefetch-preload-in-webpack-51a52358f84c
@@ -48,7 +49,7 @@ There are three general approaches to code splitting available:
4849

4950
## Entry Points
5051

51-
This is by far the easiest, and most intuitive, way to split code. However, it is more manual and has some pitfalls we will go over. Let's take a look at how we might split another module from the main bundle:
52+
This is by far the easiest and most intuitive way to split code. However, it is more manual and has some pitfalls we will go over. Let's take a look at how we might split another module from the main bundle:
5253

5354
__project__
5455

@@ -304,7 +305,7 @@ T> webpack will add the prefetch hint once the parent chunk has been loaded.
304305
Preload directive has a bunch of differences compared to prefetch:
305306

306307
- A preloaded chunk starts loading in parallel to the parent chunk. A prefetched chunk starts after the parent chunk finishes loading.
307-
- A preloaded chunk has medium priority and is instantly downloaded. A prefetched chunk is downloaded while browser is idle.
308+
- A preloaded chunk has medium priority and is instantly downloaded. A prefetched chunk is downloaded while the browser is idle.
308309
- A preloaded chunk should be instantly requested by the parent chunk. A prefetched chunk can be used anytime in the future.
309310
- Browser support is different.
310311

@@ -329,8 +330,8 @@ T> Using webpackPreload incorrectly can actually hurt performance, so be careful
329330
Once you start splitting your code, it can be useful to analyze the output to check where modules have ended up. The [official analyze tool](https://github.com/webpack/analyse) is a good place to start. There are some other community-supported options out there as well:
330331

331332
- [webpack-chart](https://alexkuz.github.io/webpack-chart/): Interactive pie chart for webpack stats.
332-
- [webpack-visualizer](https://chrisbateman.github.io/webpack-visualizer/): Visualize and analyze your bundles to see which modules are taking up space and which might be duplicates.
333-
- [webpack-bundle-analyzer](https://github.com/webpack-contrib/webpack-bundle-analyzer): A plugin and CLI utility that represents bundle content as convenient interactive zoomable treemap.
333+
- [webpack-visualizer](https://chrisbateman.github.io/webpack-visualizer/): Visualize and analyze your bundles to see which modules are taking up space and which are might be duplicates.
334+
- [webpack-bundle-analyzer](https://github.com/webpack-contrib/webpack-bundle-analyzer): A plugin and CLI utility that represents bundle content as a convenient interactive zoomable treemap.
334335
- [webpack bundle optimize helper](https://webpack.jakoblind.no/optimize): This tool will analyze your bundle and give you actionable suggestions on what to improve to reduce your bundle size.
335336

336337
## Next Steps

0 commit comments

Comments
 (0)