Skip to content

Commit d264308

Browse files
authored
Update shimming.md
Proofing + fixed small typo.
1 parent dd9ce0c commit d264308

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

content/guides/shimming.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ contributors:
77
- simon04
88
---
99

10-
`webpack` as a module bundler can understand modules written as ES2015 modules, CommonJS or AMD. But many times, while using third party libraries, we see that they expect dependencies which are global aka `$` for `jquery`. They might also be creating global variables which need to be exported. Here we will see different ways to help webpack understand these __broken modules__.
10+
`webpack` as a module bundler can understand modules written as ES2015 modules, CommonJS or AMD. But many times, while using third party libraries, we see that they expect dependencies which are global, AKA `$` for `jquery`. They might also be creating global variables which need to be exported. Here we will see different ways to help webpack understand these __broken modules__.
1111

1212
## Prefer unminified CommonJS/AMD files over bundled `dist` versions.
1313

14-
Most modules link the `dist` version in the `main` field of their `package.json`. While this is useful for most developers, for webpack it is better to alias the src version because this way webpack is able to optimize dependencies better. However in most cases `dist` works fine as well.
14+
Most modules link the `dist` version in the `main` field of their `package.json`. While this is useful for most developers, for Webpack it is better to alias the src version because this way webpack is able to optimize dependencies better. However in most cases `dist` works fine as well.
1515

1616
``` javascript
1717
// webpack.config.js
@@ -74,7 +74,7 @@ module.exports = {
7474

7575
## `exports-loader`
7676

77-
Let's say a library creates a global variable that it expects it's consumers to use. In this case we can use [`exports-loader`](/loaders/exports-loader/), to export that global variable in CommonJS format. For instance, in order to export `file` as `file` and `helpers.parse` as `parse`:
77+
Let's say a library creates a global variable that it expects its consumers to use; In this case, we can use [`exports-loader`](/loaders/exports-loader/), to export that global variable in CommonJS format. For instance, in order to export `file` as `file` and `helpers.parse` as `parse`:
7878

7979
**webpack.config.js**
8080
```javascript
@@ -93,7 +93,7 @@ module.exports = {
9393

9494
## `script-loader`
9595

96-
The [script-loader](/loaders/script-loader/) evaluates code in the global context, just like you would add the code into a `script` tag. In this mode every normal library should work. require, module, etc. are undefined.
96+
The [script-loader](/loaders/script-loader/) evaluates code in the global context, just like you would add the code into a `script` tag. In this mode, every normal library should work. require, module, etc. are undefined.
9797

9898
W> The file is added as string to the bundle. It is not minimized by `webpack`, so use a minimized version. There is also no dev tool support for libraries added by this loader.
9999

0 commit comments

Comments
 (0)