Skip to content

Commit 3512d57

Browse files
authored
Merge pull request #705 from guywald1/patch-2
Proofing + fixed small typo
2 parents a2e0eb8 + f22fa9d commit 3512d57

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

content/guides/shimming.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ 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

@@ -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)