You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,11 +4,11 @@ As developer you want to reuse existing code.
4
4
As with node.js and web all files are already in the same language, but it is extra work to use your code with the node.js module system and the browser.
5
5
6
6
The goal of `webpack` is to bundle CommonJs modules into javascript files which can be loaded by `<script>`-tags.
7
-
Simply concating all required files has a disadvantage: many code to download (and execute) on page load.
7
+
Simply concatenating all required files has a disadvantage: many code to download (and execute) on page load.
8
8
Therefore `webpack` uses the `require.ensure` function ([CommonJs/Modules/Async/A](http://wiki.commonjs.org/wiki/Modules/Async/A)) to split your code automatically into multiple bundles which are loaded on demand.
9
9
This happens mostly transparent to the developer.
10
10
Dependencies are resolved for you.
11
-
The result is a smaller inital code download which results in faster page load.
11
+
The result is a smaller initial code download which results in faster page load.
12
12
13
13
Another common thing in web development is that some files have to be preprocessed before send to the client (ex. template files).
14
14
This introduce more complexity to the compile step.
@@ -27,11 +27,11 @@ You as developer can use such files like any other module.
27
27
28
28
* make node.js and browser development similar
29
29
* minimize code size (mobile connection)
30
-
* minimize code size on inital download
30
+
* minimize code size on initial download
31
31
* download code only on demand
32
32
* require minimal configuration, but offer a maximum
33
33
* load polyfills for node-specific things if used
34
-
* offer replacements for node buildin libaries
34
+
* offer replacements for node buildin libraries
35
35
36
36
# Example
37
37
@@ -150,7 +150,7 @@ function getTemplate(templateName) {
150
150
```
151
151
152
152
In addition to that `webpack` uses the `require.context` function automatically
153
-
if you use variables or other not parseable things in the `require` function.
153
+
if you use variables or other not parse-able things in the `require` function.
154
154
That means the following code behaves like the above:
155
155
156
156
```javascript
@@ -179,7 +179,7 @@ The following example loads the raw content of a file with the `raw` loader:
179
179
var content =require("raw!./file.txt");
180
180
```
181
181
182
-
Multiple loader plugins can be prepended by seperating them with `!`.
182
+
Multiple loader plugins can be prepended by separating them with `!`.
183
183
The loader plugins are resolved like in normal `require` call but with different default extension.
184
184
185
185
The `raw` loader plugin is looked up at modules `raw-webpack-web-loader`, `raw-webpack-loader`, `raw-web-loader`, `raw-loader`, `raw`
@@ -197,7 +197,7 @@ The following loaders are included in webpack:
197
197
*`css`: Loads css file with resolved imports and returns css code
198
198
*`style`: Adds result of javascript execution to DOM
199
199
* (`.css` defaults to `style!css` loader, so all css rules are added to DOM)
200
-
*`script`: Executes a javascript file once in global context (like in script tag), requires are not parsed. Use this to include a libary. ex. `require("script!./jquery.min.js")`. This is synchron, so the `$` variable is avalible after require.
200
+
*`script`: Executes a javascript file once in global context (like in script tag), requires are not parsed. Use this to include a library. ex. `require("script!./jquery.min.js")`. This is synchron, so the `$` variable is available after require.
0 commit comments