Skip to content

Commit 9fa41e4

Browse files
authored
docs: fix typos and improve clarity in README.md (#251)
1 parent 760a321 commit 9fa41e4

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

README.md

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
# source-map-loader
1515

16-
Extracts source maps from existing source files (from their <code>sourceMappingURL</code>).
16+
Extracts source maps from existing source files (from their `<code>sourceMappingURL</code>`).
1717

1818
## Getting Started
1919

@@ -35,7 +35,7 @@ or
3535
pnpm add -D source-map-loader
3636
```
3737

38-
Then add the plugin to your `webpack` config. For example:
38+
Then add the loader to your `webpack` configuration. For example:
3939

4040
**file.js**
4141

@@ -60,14 +60,20 @@ module.exports = {
6060
```
6161

6262
The `source-map-loader` extracts existing source maps from all JavaScript entries.
63-
This includes both inline source maps as well as those linked via URL.
63+
This includes both inline source maps as well as those linked via a `sourceMappingURL`.
64+
6465
All source map data is passed to webpack for processing as per a chosen [source map style](https://webpack.js.org/configuration/devtool/) specified by the `devtool` option in [webpack.config.js](https://webpack.js.org/configuration/).
65-
This loader is especially useful when using 3rd-party libraries having their own source maps.
66-
If not extracted and processed into the source map of the webpack bundle, browsers may misinterpret source map data. `source-map-loader` allows webpack to maintain source map data continuity across libraries so ease of debugging is preserved.
66+
67+
This loader is especially useful when using third-party libraries having their own source maps.
68+
If not extracted and processed into the source map of the webpack bundle, browsers may misinterpret or ignore source map data.
69+
70+
The `source-map-loader` allows webpack to maintain source map data continuity across libraries so ease of debugging is preserved.
71+
6772
The `source-map-loader` will extract from any JavaScript file, including those in the `node_modules` directory.
73+
6874
Be mindful in setting [include](https://webpack.js.org/configuration/module/#ruleinclude) and [exclude](https://webpack.js.org/configuration/module/#ruleexclude) rule conditions to maximize bundling performance.
6975

70-
And run `webpack` via your preferred method.
76+
Finally, run `webpack` using the method you normally use (e.g., via CLI or an npm script).
7177

7278
## Options
7379

@@ -82,7 +88,7 @@ Default: `undefined`
8288

8389
Allows you to specify the behavior of the loader for `SourceMappingURL` comment.
8490

85-
The function must return one of the values:
91+
The function must return one of the following values:
8692

8793
- `true` or `'consume'` - consume the source map and remove `SourceMappingURL` comment (default behavior)
8894
- `false` or `'remove'` - do not consume the source map and remove `SourceMappingURL` comment
@@ -150,7 +156,8 @@ More information about the `ignoreWarnings` option can be found [here](https://w
150156

151157
## Contributing
152158

153-
Please take a moment to read our contributing guidelines if you haven't yet done so.
159+
We welcome all contributions!
160+
If you're new here, please take a moment to review our contributing guidelines before submitting issues or pull requests.
154161

155162
[CONTRIBUTING](./.github/CONTRIBUTING.md)
156163

0 commit comments

Comments
 (0)