Skip to content

Commit 60fcf29

Browse files
authored
docs(general): Revise "imposter syndrome" language (#5016)
1 parent d50780c commit 60fcf29

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+101
-100
lines changed

src/content/api/cli.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ related:
2929
url: https://medium.com/@nimgrg/analysing-and-minimising-the-size-of-client-side-bundle-with-webpack-and-source-map-explorer-41096559beca#.c3t2srr8x
3030
---
3131

32-
For proper usage and easy distribution of this configuration, webpack can be configured with `webpack.config.js`. Any parameters sent to the CLI will map to a corresponding parameter in the configuration file.
32+
For proper usage and easier distribution of this configuration, webpack can be configured with `webpack.config.js`. Any parameters sent to the CLI will map to a corresponding parameter in the configuration file.
3333

3434
Read the [installation guide](/guides/installation) if you don't already have webpack and CLI installed.
3535

3636
## Commands
3737

38-
webpack-cli offers a variety of commands to make working with webpack easy. By default webpack ships with
38+
webpack-cli offers a variety of commands to make working with webpack easier. By default webpack ships with
3939

4040
| Command | Usage | Description |
4141
| ------------------------------------- | ----------------------------------------------------- | ------------------------------------------------------------------------------- |
@@ -314,7 +314,7 @@ npx webpack help --mode
314314

315315
**Show version of installed packages and sub-packages**
316316

317-
To inspect the version of `webpack` and `webpack-cli` you are using just run command:
317+
To inspect the version of `webpack` and `webpack-cli` you are using, run the command:
318318

319319
```bash
320320
npx webpack --version
@@ -339,7 +339,7 @@ webpack-cli 4.6.0
339339
webpack-dev-server 3.11.2
340340
```
341341

342-
To inspect the version of any `webpack-cli` sub-package (like `@webpack-cli/info`) just run command similar to the following:
342+
To inspect the version of any `webpack-cli` sub-package (like `@webpack-cli/info`), run command similar to the following:
343343

344344
```bash
345345
npx webpack info --version

src/content/api/compilation-hooks.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ Any additional chunk assets are stored in `compilation.additionalChunkAssets`.
389389

390390
- Callback Parameters: `chunks`
391391

392-
Here's an example that simply adds a banner to each chunk.
392+
Here's an example that adds a banner to each chunk.
393393

394394
```js
395395
compilation.hooks.optimizeChunkAssets.tapAsync(

src/content/api/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The following high-level information should get you started.
1414

1515
The Command Line Interface (CLI) to configure and interact with your build. It
1616
is especially useful in the case of early prototyping and profiling. For the
17-
most part, the CLI is simply used to kick off the process using a configuration
17+
most part, the CLI is used to kick off the process using a configuration
1818
file and a few flags (e.g. `--env`).
1919

2020
[Learn more about the CLI!](/api/cli)
@@ -29,7 +29,7 @@ and [variables](/api/module-variables) – that are supported.
2929

3030
## Node
3131

32-
While most users can get away with just using the CLI along with a
32+
While most users can get away with using the CLI along with a
3333
configuration file, more fine-grained control of the compilation can be
3434
achieved via the Node interface. This includes passing multiple configurations,
3535
programmatically running or watching, and collecting stats.

src/content/api/loaders.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ contributors:
1616
- jamesgeorge007
1717
---
1818

19-
A loader is just a JavaScript module that exports a function. The [loader runner](https://github.com/webpack/loader-runner) calls this function and passes the result of the previous loader or the resource file into it. The `this` context of the function is filled-in by webpack and the [loader runner](https://github.com/webpack/loader-runner) with some useful methods that allow the loader (among other things) to change its invocation style to async, or get query parameters.
19+
A loader is a JavaScript module that exports a function. The [loader runner](https://github.com/webpack/loader-runner) calls this function and passes the result of the previous loader or the resource file into it. The `this` context of the function is filled-in by webpack and the [loader runner](https://github.com/webpack/loader-runner) with some useful methods that allow the loader (among other things) to change its invocation style to async, or get query parameters.
2020

2121
The first loader is passed one argument: the content of the resource file. The compiler expects a result from the last loader. The result should be a `String` or a `Buffer` (which is converted to a string), representing the JavaScript source code of the module. An optional SourceMap result (as a JSON object) may also be passed.
2222

@@ -50,7 +50,7 @@ module.exports = function (content, map, meta) {
5050
};
5151
```
5252

53-
The `this.callback` method is more flexible as it allows multiple arguments to be passed as opposed to just the `content`.
53+
The `this.callback` method is more flexible as it allows multiple arguments to be passed as opposed to only the `content`.
5454

5555
**sync-loader-with-multiple-results.js**
5656

src/content/api/module-methods.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ W> This CANNOT be used in an asynchronous function.
297297
define(value: !Function)
298298
```
299299

300-
This will simply export the provided `value`. The `value` here can be anything except a function.
300+
This will export the provided `value`. The `value` here can be anything except a function.
301301

302302
```javascript
303303
define({
@@ -445,7 +445,7 @@ if (require.cache[require.resolveWeak('module')]) {
445445
}
446446

447447
// You can perform dynamic resolves ("context")
448-
// just as with other require/import methods.
448+
// similarly to other require/import methods.
449449
const page = 'Foo';
450450
__webpack_modules__[require.resolveWeak(`./page/${page}`)];
451451
```

src/content/api/node.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ webpack runner or have it build and watch for changes, much like the
7272

7373
Typically, only one master `Compiler` instance is created, although child
7474
compilers can be created in order to delegate specific tasks. The `Compiler` is
75-
ultimately just a function which performs bare minimum functionality to keep a
75+
ultimately a function which performs bare minimum functionality to keep a
7676
lifecycle running. It delegates all the loading, bundling, and writing work to
7777
registered plugins.
7878

@@ -144,8 +144,8 @@ const watching = compiler.watch({
144144
`Watching` options are covered in detail
145145
[here](/configuration/watch/#watchoptions).
146146

147-
W> Filesystem inaccuracies may trigger multiple builds for a single change. So,
148-
in the example above, the `console.log` statement may fire multiple times for a
147+
W> Filesystem inaccuracies may trigger multiple builds for a single change.
148+
In the example above, the `console.log` statement may fire multiple times for a
149149
single modification. Users should expect this behavior and may check
150150
`stats.hash` to see if the file hash has actually changed.
151151

src/content/api/plugins.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ The moral of the story is that there are a variety of ways to `hook` into the
8888
## Custom Hooks
8989

9090
In order to add a new hook to the compilation for other plugins to `tap` into,
91-
simply `require` the necessary hook class from `tapable` and create one:
91+
you then `require` the necessary hook class from `tapable` and create one:
9292

9393
```js
9494
const SyncHook = require('tapable').SyncHook;

src/content/blog/2020-10-10-webpack-5-release.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ Behavior can be changed with `Rule.parser.requireInclude` to allowed, deprecated
9898

9999
In the early days, webpack's aim was to allow running most Node.js modules in the browser, but the module landscape changed and many module uses are now written mainly for frontend purposes. webpack <= 4 ships with polyfills for many of the Node.js core modules, which are automatically applied once a module uses any of the core modules (i.e. the `crypto` module).
100100

101-
While this makes using modules written for Node.js easy, it adds these huge polyfills to the bundle. In many cases these polyfills are unnecessary.
101+
While this makes using modules written for Node.js easier, it adds these huge polyfills to the bundle. In many cases these polyfills are unnecessary.
102102

103103
webpack 5 stops automatically polyfilling these core modules and focus on frontend-compatible modules. Our goal is to improve compatibility with the web platform, where Node.js core modules are not available.
104104

@@ -253,7 +253,7 @@ Webpack 5 allows to pass a list of targets and also support versions of target.
253253

254254
Examples: `target: "node14"` `target: ["web", "es2020"]`
255255

256-
This is a simple way to provide webpack all the information it needs to determine:
256+
This enables us to provide webpack all the information it needs to determine:
257257

258258
- chunk loading mechanism, and
259259
- supported syntax like arrow functions

src/content/blog/2020-12-08-roadmap-2021.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ A potential fix would be to include the side-effect-free module in all entrypoin
2626
So we went another route, which required the development of a new feature: `runtime-dependent code generation`.
2727
This allows to generate code which behaves differently depending on which runtime it executes.
2828

29-
Basically, we are wrapping some generated code in `if`-blocks, so they only execute in one runtime.
29+
To put it another way, we are wrapping some generated code in `if`-blocks, so they only execute in one runtime.
3030
In this example, this would affect the `import`-statement which references the side-effect-free module.
3131
The import is only executed for one of the entrypoints.
3232
This avoids to include unnecessary modules, and it also avoids executing unnecessary code even if it would be available.
@@ -50,7 +50,7 @@ We think that many many webpack users need custom things for their build and tha
5050
### EcmaScript Modules
5151

5252
EcmaScript Modules (ESM) are slowly gaining wide-spread adoption.
53-
On authoring side they are basically already the go-to standard to write code.
53+
On authoring side they are already the de facto standard to write code.
5454
On browser support it also looks pretty ok (except for IE11 and a few older mobile browsers).
5555
Browsers are still a bit lacking in supporting ESM for WebWorkers.
5656

@@ -118,7 +118,7 @@ The biggest problem is the `"sideEffects": false` flag. It affects modules on pe
118118
When the output should be a library that will be processed by a bundler later, this needs to be considered.
119119

120120
I could think of a special mode, which does not apply chunking and instead, emit the raw (processed) modules connected via ESM imports and exports (or also CommonJS `require`).
121-
So this basically means loaders, module graph, and asset optimizations run, but no chunk graph is created and each module in the module graph is emitted as a separate file.
121+
So this means loaders, module graph, and asset optimizations run, but no chunk graph is created and each module in the module graph is emitted as a separate file.
122122

123123
#### Strict mode warnings
124124

@@ -144,7 +144,7 @@ Currently webpack supports CSS via `css-loader`, `style-loader` or `mini-css-ext
144144
This is working pretty well, but I think we can do more by supporting CSS as a native module type in webpack.
145145

146146
A major benefit would be the developer experience: The `mini-css-extract-plugin` configuration is not the easiest and getting rid of it would simplify a lot for the developer.
147-
Of course, that doesn't mean you can add additional customization on top of that.
147+
That doesn't mean you can add additional customization on top of that.
148148
I see many developers not using raw CSS, but using preprocessors on top of that (with native CSS support this would look like that: `{ test: /\.sass$/, type: "stylesheet", use: "sass-loader" }`).
149149

150150
As of [State of CSS 2020](https://2020.stateofcss.com/en-US/technologies/css-in-js/) CSS Modules is a popular way of writing modular CSS and it being a native module type in webpack allows to benefit from module graph optimization like Tree Shaking (Used Exports Optimization and Side-Effects optimization). When using CSS Modules this means the resulting CSS will only contain CSS rules that are referenced from the application (as one is used to from JS Tree Shaking).

src/content/branding.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ The webpack logo should be placed on a white background with enough space around
2222

2323
[svg](https://github.com/webpack/media/blob/master/logo/logo-on-white-bg.svg) | [png](https://github.com/webpack/media/blob/master/logo/logo-on-white-bg.png) | [jpg](https://github.com/webpack/media/blob/master/logo/logo-on-white-bg.jpg)
2424

25-
Just double the size of the inner dark blue cube to get an idea how much space the logo should have.
25+
Double the size of the inner dark blue cube to get an idea how much space the logo should have.
2626

2727
For dark backgrounds, you can use the negative version of the logo:
2828

src/content/concepts/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ T> The most important part to take away from this document is that there are man
3030

3131
The examples below describe how webpack's configuration can be both expressive and configurable because _it is code_:
3232

33-
## Simple Configuration
33+
## Introductory Configuration
3434

3535
**webpack.config.js**
3636

src/content/concepts/dependency-graph.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ related:
1414
Any time one file depends on another, webpack treats this as a _dependency_. This allows webpack to take non-code assets, such as images or web fonts, and also provide them as _dependencies_ for your application.
1515

1616
When webpack processes your application, it starts from a list of modules defined on the command line or in its configuration file.
17-
Starting from these [_entry points_](/concepts/entry-points/), webpack recursively builds a _dependency graph_ that includes every module your application needs, then bundles all of those modules into a small number of _bundles_ - often, just one - to be loaded by the browser.
17+
Starting from these [_entry points_](/concepts/entry-points/), webpack recursively builds a _dependency graph_ that includes every module your application needs, then bundles all of those modules into a small number of _bundles_ - often, only one - to be loaded by the browser.
1818

1919
T> Bundling your application is especially powerful for _HTTP/1.1_ clients, as it minimizes the number of times your app has to wait while the browser starts a new request. For _HTTP/2_, you can also use [Code Splitting](/guides/code-splitting/) to achieve best results.

src/content/concepts/manifest.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ This article will focus on the last of these three parts: the runtime and, in pa
2323

2424
## Runtime
2525

26-
The runtime, along with the manifest data, is basically all the code webpack needs to connect your modularized application while it's running in the browser. It contains the loading and resolving logic needed to connect your modules as they interact. This includes connecting modules that have already been loaded into the browser as well as logic to lazy-load the ones that haven't.
26+
The runtime, along with the manifest data, is all the code webpack needs to connect your modularized application while it's running in the browser. It contains the loading and resolving logic needed to connect your modules as they interact. This includes connecting modules that have already been loaded into the browser as well as logic to lazy-load the ones that haven't.
2727

2828
## Manifest
2929

@@ -33,7 +33,7 @@ As the compiler enters, resolves, and maps out your application, it keeps detail
3333

3434
## The Problem
3535

36-
So now you have a little bit of insight about how webpack works behind the scenes. "But, how does this affect me?", you might ask. The simple answer is that most of the time it doesn't. The runtime will do its thing, utilizing the manifest, and everything will appear to just magically work once your application hits the browser. However, if you decide to improve the performance of your projects by utilizing browser caching, this process will all of a sudden become an important thing to understand.
36+
So now you have a little bit of insight about how webpack works behind the scenes. "But, how does this affect me?", you might ask. Most of the time, it doesn't. The runtime will do its thing, utilizing the manifest, and everything will appear to magically work once your application hits the browser. However, if you decide to improve the performance of your projects by utilizing browser caching, this process will all of a sudden become an important thing to understand.
3737

3838
By using content hashes within your bundle file names, you can indicate to the browser when the content of a file has changed, thus invalidating the cache. Once you start doing this though, you'll immediately notice some funny behavior. Certain hashes change even when their content apparently does not. This is caused by the injection of the runtime and manifest, which changes every build.
3939

src/content/concepts/targets.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ W> The webpack `target` property is not to be confused with the `output.libraryT
1616

1717
## Usage
1818

19-
To set the `target` property, you simply set the target value in your webpack config:
19+
To set the `target` property, you set the target value in your webpack config:
2020

2121
**webpack.config.js**
2222

src/content/concepts/why-webpack.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ IIFEs solve scoping issues for large projects; when script files are wrapped by
1818

1919
The use of IIFEs led to tools like Make, Gulp, Grunt, Broccoli or Brunch. These tools are known as task runners, and they concatenate all your project files together.
2020

21-
However, changing one file means you have to rebuild the whole thing. Concatenating makes it easy to reuse scripts across files but makes build optimizations more difficult. How can you find out if code is actually being used or not?
21+
However, changing one file means you have to rebuild the whole thing. Concatenating makes it easier to reuse scripts across files but makes build optimizations more difficult. How can you find out if code is actually being used or not?
2222

2323
Even if you only use a single function from lodash, you have to add the entire library and then squish it together. How do you treeshake the dependencies on your code? Lazy loading chunks of code can be hard to do at scale and requires a lot of manual work from the developer.
2424

src/content/configuration/configuration-languages.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ and then proceed to write your configuration:
3232
```typescript
3333
import * as path from 'path';
3434
import * as webpack from 'webpack';
35-
// just in case you run into any typescript error when configuring `devServer`
35+
// in case you run into any typescript error when configuring `devServer`
3636
import 'webpack-dev-server';
3737

3838
const config: webpack.Configuration = {

src/content/configuration/dev-server.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ T> Options that are compatible with [webpack-dev-middleware](https://github.com/
3232

3333
`object`
3434

35-
This set of options is picked up by [webpack-dev-server](https://github.com/webpack/webpack-dev-server) and can be used to change its behavior in various ways. Here's a simple example that gzips and serves everything from our `dist/` directory in the project root:
35+
This set of options is picked up by [webpack-dev-server](https://github.com/webpack/webpack-dev-server) and can be used to change its behavior in various ways. Here's a rudimentary example that gzips and serves everything from our `dist/` directory in the project root:
3636

3737
**webpack.config.js**
3838

src/content/configuration/entry-context.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ The point or points where to start the application bundling process. If an array
4242

4343
A dynamically loaded module is **not** an entry point.
4444

45-
Simple rule: one entry point per HTML page. SPA: one entry point, MPA: multiple entry points.
45+
A rule to consider: one entry point per HTML page. SPA: one entry point, MPA: multiple entry points.
4646

4747
```js
4848
module.exports = {

src/content/configuration/module.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ Parsers may inspect these options and disable or reconfigure themselves accordin
466466
- Setting the option to `false` disables the parser.
467467
- Setting the option to `true` or leaving it `undefined` enables the parser.
468468

469-
However, parser plugins may accept more than just a boolean. For example, the internal `NodeStuffPlugin` can accept an object instead of `true` to add additional options for a particular Rule.
469+
However, parser plugins may accept more than only a boolean. For example, the internal `NodeStuffPlugin` can accept an object instead of `true` to add additional options for a particular Rule.
470470

471471
**Examples** (parser options by the default plugins):
472472

src/content/configuration/other-options.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ T> Combine `profile: true` with `parallelism: 1` to get correct timings. Note th
531531

532532
`string`
533533

534-
Use this option to generate a JSON file containing webpack "records" – pieces of data used to store module identifiers across multiple builds. You can use this file to track how modules change between builds. To generate one, simply specify a location:
534+
Use this option to generate a JSON file containing webpack "records" – pieces of data used to store module identifiers across multiple builds. You can use this file to track how modules change between builds. To generate one, specify a location:
535535

536536
**webpack.config.js**
537537

0 commit comments

Comments
 (0)