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
MIT (http://www.opensource.org/licenses/mit-license.php)
238
238
239
+
## Thanks to
240
+
241
+
(In chronological order)
242
+
243
+
*@google for [Google Web Toolkit (GWT)](https://code.google.com/p/google-web-toolkit), which aims to compile Java to Javascript. It features a similar [Code Splitting](https://code.google.com/p/google-web-toolkit/wiki/CodeSplitting) as webpack.
244
+
*@medikoo for [modules-webmake](https://github.com/medikoo/modules-webmake), which is a simlar project. webpack was born because I wanted Code Splitting for modules-webpack. Interestingly the [Code Splitting issue is still open](https://github.com/medikoo/modules-webmake/issues/7) (thanks also to @Phoscur for the discussion).
245
+
*@substack for [browserify](http://browserify.org/), which is a similar project and source for many ideas.
246
+
*@jrburke for [require.js](http://requirejs.org/), which is a similar project and source for many ideas.
247
+
*@defunctzombie for the [browser-field spec](https://gist.github.com/defunctzombie/4339901), which makes modules available for node.js, browserify and webpack.
248
+
* Every early webpack user, which contributed to webpack by writing issues or PRs. You influenced the direction...
249
+
*@shama, @jhnns and @sokra for maintaining this project
250
+
* Everyone who has written a loader for webpack. You are the ecosystem...
251
+
* Everyone I forgot to mention here, but also influenced webpack.
252
+
253
+
239
254
## Sponsor
240
255
241
256
This is a free-time project. The time I invest in it fluctuates. If you use webpack for a serious task, and you'd like me to invest more time on it, please donate. This project increases your income/productivity too. It makes development and applications faster and it reduces the required bandwidth.
Copy file name to clipboardExpand all lines: examples/commonjs/README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
-
This very simple example shows usage of CommonsJS.
1
+
This very simple example shows usage of CommonJS.
2
2
3
3
The three files `example.js`, `increment.js` and `math.js` form a dependency chain. They use `require(dependency)` to declare dependencies.
4
4
5
-
You can see the output file that webpack creates by bundling them together in one file. Keep in mind that webpack adds comments to make reading this file easier. These commonent are removed when minimizing the file.
5
+
You can see the output file that webpack creates by bundling them together in one file. Keep in mind that webpack adds comments to make reading this file easier. These comments are removed when minimizing the file.
6
6
7
7
You can also see the info messages webpack prints to console (for both normal and minimized build).
Copy file name to clipboardExpand all lines: examples/commonjs/template.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
-
This very simple example shows usage of CommonsJS.
1
+
This very simple example shows usage of CommonJS.
2
2
3
3
The three files `example.js`, `increment.js` and `math.js` form a dependency chain. They use `require(dependency)` to declare dependencies.
4
4
5
-
You can see the output file that webpack creates by bundling them together in one file. Keep in mind that webpack adds comments to make reading this file easier. These commonent are removed when minimizing the file.
5
+
You can see the output file that webpack creates by bundling them together in one file. Keep in mind that webpack adds comments to make reading this file easier. These comments are removed when minimizing the file.
6
6
7
7
You can also see the info messages webpack prints to console (for both normal and minimized build).
Copy file name to clipboardExpand all lines: examples/externals/README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
-
This example demonstrate how to build a library with webpack that has dependencies to other libraries which should not be included in the compiled version.
1
+
This example demonstrates how to build a library with webpack that has dependencies to other libraries which should not be included in the compiled version.
2
2
3
3
We use the `libraryTarget: "umd"` option to build a UMD module that is consumable in CommonJs, AMD and with script tags. We don't specify the `library` option so the library is exported to the root namespace.
4
4
5
5
We use the `externals` option to define dependencies that should be resolved in the target environment.
6
6
7
-
In the simple case we just need to specify a string (`"add"`). Than it's resolved as `"add"` module in CommonJs and AMD, and as global `add` when used with script tag.
7
+
In the simple case we just need to specify a string (`"add"`). Then it's resolved as `"add"` module in CommonJs and AMD, and as global `add` when used with script tag.
8
8
9
9
In the complex case we specify different values for each environment:
Copy file name to clipboardExpand all lines: examples/externals/template.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
-
This example demonstrate how to build a library with webpack that has dependencies to other libraries which should not be included in the compiled version.
1
+
This example demonstrates how to build a library with webpack that has dependencies to other libraries which should not be included in the compiled version.
2
2
3
3
We use the `libraryTarget: "umd"` option to build a UMD module that is consumable in CommonJs, AMD and with script tags. We don't specify the `library` option so the library is exported to the root namespace.
4
4
5
5
We use the `externals` option to define dependencies that should be resolved in the target environment.
6
6
7
-
In the simple case we just need to specify a string (`"add"`). Than it's resolved as `"add"` module in CommonJs and AMD, and as global `add` when used with script tag.
7
+
In the simple case we just need to specify a string (`"add"`). Then it's resolved as `"add"` module in CommonJs and AMD, and as global `add` when used with script tag.
8
8
9
9
In the complex case we specify different values for each environment:
Copy file name to clipboardExpand all lines: examples/multiple-entry-points/README.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
-
This example show how to use multiple entry points with a commons chunk.
1
+
This example shows how to use multiple entry points with a commons chunk.
2
2
3
-
In this example you have two (HTML) pages `pageA` and `pageB`. You want to create individual bundles for each page. In addition to this you want to create a shared bundle that contains all modules that used in both pages (assuming there are many/big modules in common). The pages also use Code Splitting to load a less used part of the features on demand.
3
+
In this example you have two (HTML) pages `pageA` and `pageB`. You want to create individual bundles for each page. In addition to this you want to create a shared bundle that contains all modules used in both pages (assuming there are many/big modules in common). The pages also use Code Splitting to load a less used part of the features on demand.
4
4
5
5
You can see how to define multiple entry points via the `entry` option and the required changes (`[name]`) in the `output` option. You can also see how to use the CommonsChunkPlugin.
6
6
@@ -13,15 +13,15 @@ You can see the output files:
13
13
*`pageA.bundle.js` contains: (`pageB.bundle.js` is similar)
14
14
* the entry point `pageA.js`
15
15
* it would contain any other module that is only used by `pageA`
16
-
*`0.chunk.js` is an additional chunk which if used by both pages. It contains:
16
+
*`0.chunk.js` is an additional chunk which is used by both pages. It contains:
17
17
* module `shared.js`
18
18
19
19
You can also see the info that is printed to console. It shows among others:
Copy file name to clipboardExpand all lines: examples/multiple-entry-points/template.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
-
This example show how to use multiple entry points with a commons chunk.
1
+
This example shows how to use multiple entry points with a commons chunk.
2
2
3
-
In this example you have two (HTML) pages `pageA` and `pageB`. You want to create individual bundles for each page. In addition to this you want to create a shared bundle that contains all modules that used in both pages (assuming there are many/big modules in common). The pages also use Code Splitting to load a less used part of the features on demand.
3
+
In this example you have two (HTML) pages `pageA` and `pageB`. You want to create individual bundles for each page. In addition to this you want to create a shared bundle that contains all modules used in both pages (assuming there are many/big modules in common). The pages also use Code Splitting to load a less used part of the features on demand.
4
4
5
5
You can see how to define multiple entry points via the `entry` option and the required changes (`[name]`) in the `output` option. You can also see how to use the CommonsChunkPlugin.
6
6
@@ -13,15 +13,15 @@ You can see the output files:
13
13
*`pageA.bundle.js` contains: (`pageB.bundle.js` is similar)
14
14
* the entry point `pageA.js`
15
15
* it would contain any other module that is only used by `pageA`
16
-
*`0.chunk.js` is an additional chunk which if used by both pages. It contains:
16
+
*`0.chunk.js` is an additional chunk which is used by both pages. It contains:
17
17
* module `shared.js`
18
18
19
19
You can also see the info that is printed to console. It shows among others:
0 commit comments