Skip to content

Commit 81cd76f

Browse files
Apply suggestions from code review
Co-authored-by: Nicolò Ribaudo <[email protected]>
1 parent 7859db8 commit 81cd76f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/content/configuration/experiments.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -214,13 +214,13 @@ Defaults to the value of [`futureDefaults`](#experimentsfuturedefaults).
214214

215215
Enable support of the tc39 proposal [Deferring Module Evaluation](https://github.com/tc39/proposal-defer-import-eval).
216216
This allows deferring the evaluation of a module until its first use.
217-
This is useful when using dynamic `import()` is problematic.
217+
This is useful to synchronously defer code execution when it's not possible to use `import()` due to its asynchronous nature.
218218

219219
- Type: `boolean`
220220

221221
This feature requires the runtime environment to have [`Proxy`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy) (ES6) support.
222222

223-
Enable the following syntaxes:
223+
Enables the following syntaxes:
224224

225225
```js
226226
import defer * as module from 'module-name';
@@ -235,9 +235,9 @@ export function f() {
235235

236236
#### Limitations of magic comments (`/* webpackDefer: true */`)
237237

238-
It's suggested to put the magic comment after the `from` keyword, other positions may work, but have not been tested.
238+
It's suggested to put the magic comment after the `from` keyword. Other positions may work, but have not been tested.
239239

240-
Putting the magic comment after the `import` keyword is known to be broken, it will break the filesystem cache.
240+
Putting the magic comment after the `import` keyword is incompatible with the filesystem cache.
241241

242242
```js
243243
import /* webpackDefer: true */ * as ns from '...'; // known broken

src/content/guides/lazy-loading.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,11 @@ index.bundle.js 548 kB 1 [emitted] [big] index
102102

103103
## Defer Import Example
104104

105-
W> This section does not lazy "load" a module, but lazy "evaluate" a module. This means that the module is still downloaded and parsed, but its evaluation is lazy.
105+
W> This feature does not lazily "load" a module, but it lazily "evaluates" a module. This means that the module is still downloaded and parsed, but its evaluation is lazy.
106106

107107
In some cases, it might be annoying or hard to convert all uses of a module to asynchronous, since it enforces the unnecessary asyncification of all functions, without providing the ability to only defer the synchronous evaluation work.
108108

109-
The tc39 proposal [Deferring Module Evaluation](https://github.com/tc39/proposal-defer-import-eval) is to solve this problem.
109+
The TC39 proposal [Deferring Module Evaluation](https://github.com/tc39/proposal-defer-import-eval) is to solve this problem.
110110

111111
> The proposal is to have a new syntactical import form which will only ever return a namespace exotic object. When used, the module and its dependencies would not be executed, but would be fully loaded to the point of being execution-ready before the module graph is considered loaded.
112112
>

0 commit comments

Comments
 (0)