Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update grammar mistakes in examples #16988

Merged
merged 1 commit into from Apr 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions examples/scope-hoisting/README.md
Expand Up @@ -4,17 +4,17 @@ This is the dependency graph for the example: (solid lines express sync imports,

![](graph.png)

All modules except `cjs` are EcmaScript modules. `cjs` is a CommonJs module.
All modules except `cjs` are EcmaScript modules. `cjs` is a CommonJS module.

The interesting thing here is that putting all modules in single scope won't work, because of multiple reasons:
The interesting thing here is that putting all modules in a single scope won't work, because of multiple reasons:

- Modules `lazy`, `c`, `d` and `cjs` need to be in a separate chunk
- Module `shared` is accessed by two chunks (different scopes)
- Module `cjs` is a CommonJs module
- Module `cjs` is a CommonJS module

![](graph2.png)

webpack therefore uses a approach called **"Partial Scope Hoisting"** or "Module concatenation", which chooses the largest possible subsets of ES modules which can be scope hoisted and combines them with the default webpack primitives.
Webpack, therefore, uses an approach called **"Partial Scope Hoisting"** or "Module concatenation", which chooses the largest possible subsets of ES modules which can be scope hoisted and combines them with the default webpack primitives.

![](graph3.png)

Expand Down
6 changes: 3 additions & 3 deletions examples/scope-hoisting/template.md
Expand Up @@ -4,17 +4,17 @@ This is the dependency graph for the example: (solid lines express sync imports,

![](graph.png)

All modules except `cjs` are EcmaScript modules. `cjs` is a CommonJs module.
All modules except `cjs` are EcmaScript modules. `cjs` is a CommonJS module.

The interesting thing here is that putting all modules in single scope won't work, because of multiple reasons:
The interesting thing here is that putting all modules in a single scope won't work, because of multiple reasons:

- Modules `lazy`, `c`, `d` and `cjs` need to be in a separate chunk
- Module `shared` is accessed by two chunks (different scopes)
- Module `cjs` is a CommonJs module

![](graph2.png)

webpack therefore uses a approach called **"Partial Scope Hoisting"** or "Module concatenation", which chooses the largest possible subsets of ES modules which can be scope hoisted and combines them with the default webpack primitives.
Webpack, therefore, uses a approach called **"Partial Scope Hoisting"** or "Module concatenation", which chooses the largest possible subsets of ES modules which can be scope hoisted and combines them with the default webpack primitives.

![](graph3.png)

Expand Down
2 changes: 1 addition & 1 deletion examples/side-effects/README.md
@@ -1,4 +1,4 @@
This example shows how the `sideEffects` flag for library authors works.
This example shows how the `sideEffects` flag works for library authors.

The example contains a large library, `big-module`. `big-module` contains multiple child modules: `a`, `b` and `c`. The exports from the child modules are re-exported in the entry module (`index.js`) of the library. A consumer uses **some** of the exports, importing them from the library via `import { a, b } from "big-module"`. According to the EcmaScript spec, all child modules _must_ be evaluated because they could contain side effects.

Expand Down
2 changes: 1 addition & 1 deletion examples/side-effects/template.md
@@ -1,4 +1,4 @@
This example shows how the `sideEffects` flag for library authors works.
This example shows how the `sideEffects` flag works for library authors.

The example contains a large library, `big-module`. `big-module` contains multiple child modules: `a`, `b` and `c`. The exports from the child modules are re-exported in the entry module (`index.js`) of the library. A consumer uses **some** of the exports, importing them from the library via `import { a, b } from "big-module"`. According to the EcmaScript spec, all child modules _must_ be evaluated because they could contain side effects.

Expand Down