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
+22-22Lines changed: 22 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# modules-webpack
1
+
# webpack
2
2
3
3
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.
@@ -15,11 +15,11 @@ This introduce more complexity to the compile step.
15
15
`webpack` supports loaders which process files before including them.
16
16
You as developer can use such files like any other module.
See [example webapp](http://sokra.github.com/modules-webpack-example/).
57
+
See [example webapp](http://webpack.github.com/example-app/).
58
58
59
-
More [examples](https://github.com/sokra/modules-webpack/tree/master/examples).
59
+
More [examples](https://github.com/webpack/webpack/tree/master/examples).
60
60
61
61
## Simple Example
62
62
@@ -120,9 +120,9 @@ Initially only `web.js` is included (and loaded) by your application.
120
120
`1.web.js` is loaded when the call to `require.ensure` happens.
121
121
After the second bundle (`1.web.js`) is loaded, the callback function will be invoked.
122
122
123
-
See [details](/sokra/modules-webpack/tree/master/examples/code-splitting) for exact output.
123
+
See [details](/webpack/webpack/tree/master/examples/code-splitting) for exact output.
124
124
125
-
See [more examples](/sokra/modules-webpack/tree/master/examples).
125
+
See [more examples](/webpack/webpack/tree/master/examples).
126
126
127
127
## Reusing node.js code
128
128
@@ -182,7 +182,7 @@ function getTemplate(templateName) {
182
182
// which compiles to: return require(123)("./"+templateName)
183
183
```
184
184
185
-
See [details](/sokra/modules-webpack/tree/master/examples/require.context) for complete example.
185
+
See [details](/webpack/webpack/tree/master/examples/require.context) for complete example.
186
186
187
187
When try to store the `require` function in another variable or try to pass it as parameter,
188
188
`webpack` convert it to a `require.context(".")` to be compatible.
@@ -207,21 +207,21 @@ The `raw` loader plugin is looked up at modules `raw-webpack-web-loader`, `raw-w
207
207
and the following files are looked up: `index.webpack-web-loader.js`, `index.webpack-loader.js`, `index.web-loader.js`, `index.loader.js`, `index`, `index.js`.
208
208
Note that the `web-` versions are omitted if loaders are used in node.js.
209
209
210
-
See [example](/sokra/modules-webpack/tree/master/examples/loader).
210
+
See [example](/webpack/webpack/tree/master/examples/loader).
211
211
212
212
The following loaders are included in webpack:
213
213
214
-
*[`raw`](https://github.com/sokra/webpack-raw-loader): Loads raw content of a file (as utf-8)
215
-
*[`json`](https://github.com/sokra/webpack-json-loader) (default at `.json`): Loads file as JSON
216
-
*[`jade`](https://github.com/sokra/webpack-jade-loader) (default at `.jade`): Loads jade template and returns a function
217
-
*[`coffee`](https://github.com/sokra/webpack-coffee-loader) (default at `.coffee`): Loads coffee-script like javascript
218
-
*[`css`](https://github.com/sokra/webpack-css-loader): Loads css file with resolved imports and returns css code
219
-
*[`less`](https://github.com/sokra/webpack-less-loader): Loads and compiles a less file and returns css code
220
-
*[`val`](https://github.com/sokra/webpack-val-loader): Excutes code as module and consider exports as javascript code
221
-
*[`bundle`](https://github.com/sokra/webpack-bundle-loader): Wraps request in a `require.ensure` block
222
-
*[`file`](https://github.com/sokra/webpack-file-loader): Emits the file into the output folder and returns the (relative) url (`file/{ext}` for some extensions)
223
-
*[`style`](https://github.com/sokra/webpack-style-loader): Adds result of javascript execution to DOM
224
-
*[`script`](https://github.com/sokra/webpack-script-loader): 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.
214
+
*[`raw`](https://github.com/webpack/raw-loader): Loads raw content of a file (as utf-8)
215
+
*[`json`](https://github.com/webpack/json-loader) (default at `.json`): Loads file as JSON
216
+
*[`jade`](https://github.com/webpack/jade-loader) (default at `.jade`): Loads jade template and returns a function
217
+
*[`coffee`](https://github.com/webpack/coffee-loader) (default at `.coffee`): Loads coffee-script like javascript
218
+
*[`css`](https://github.com/webpack/css-loader): Loads css file with resolved imports and returns css code
219
+
*[`less`](https://github.com/webpack/less-loader): Loads and compiles a less file and returns css code
220
+
*[`val`](https://github.com/webpack/val-loader): Excutes code as module and consider exports as javascript code
221
+
*[`bundle`](https://github.com/webpack/bundle-loader): Wraps request in a `require.ensure` block
222
+
*[`file`](https://github.com/webpack/file-loader): Emits the file into the output folder and returns the (relative) url (`file/{ext}` for some extensions)
223
+
*[`style`](https://github.com/webpack/style-loader): Adds result of javascript execution to DOM
224
+
*[`script`](https://github.com/webpack/script-loader): 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.
225
225
* (`.css` defaults to `style!css` loader, so all css rules are added to DOM)
226
226
* (`.less` defaults to `style!css!val/cacheable!less` loader, so all less rules are added to DOM)
227
227
@@ -533,7 +533,7 @@ else `stats` as json:
533
533
534
534
### with grunt
535
535
536
-
see [grunt-webpack](https://github.com/sokra/grunt-webpack).
536
+
see [grunt-webpack](https://github.com/webpack/grunt-webpack).
537
537
538
538
## Bonus features
539
539
@@ -554,7 +554,7 @@ Combine the options `--colors --watch --progress` to get a pretty shell compilat
0 commit comments