From 481c19f55c9d29a252fc5aad70c1e5f5704d273b Mon Sep 17 00:00:00 2001 From: Albus Dumbledore Date: Fri, 28 Feb 2020 20:30:42 +0530 Subject: [PATCH] docs(code-splitting): Improve template.md --- examples/code-splitting/template.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/examples/code-splitting/template.md b/examples/code-splitting/template.md index 1795675d6..36faf649e 100644 --- a/examples/code-splitting/template.md +++ b/examples/code-splitting/template.md @@ -1,13 +1,12 @@ This example illustrates a very simple case of Code Splitting with `require.ensure`. - `a` and `b` are required normally via CommonJS -- `c` is depended through the `require.ensure` array. - - This means: make it available, but don't execute it +- `c` is made available(,but doesn't get execute) through the `require.ensure` array. - webpack will load it on demand - `b` and `d` are required via CommonJs in the `require.ensure` callback - webpack detects that these are in the on-demand-callback and - will load them on demand - - webpacks optimizer can optimize `b` away + - webpack's optimizer can optimize `b` away - as it is already available through the parent chunks You can see that webpack outputs two files/chunks: @@ -18,7 +17,7 @@ You can see that webpack outputs two files/chunks: - the entry point `example.js` - module `a` - module `b` -- `1.output.js` is an additional chunk (on demand loaded) and contains +- `1.output.js` is an additional chunk (on-demand loaded) and contains - module `c` - module `d`