Skip to content

Commit 8d3efe7

Browse files
authored
Merge branch 'next' into perf/modules-set
2 parents df44599 + 77a3c87 commit 8d3efe7

125 files changed

Lines changed: 1203 additions & 420 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintrc renamed to .eslintrc.js

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
{
1+
module.exports = {
22
"root": true,
33
"plugins": ["node"],
44
"extends": ["eslint:recommended", "plugin:node/recommended"],
55
"env": {
6-
"node": true
6+
"node": true,
7+
"es6": true,
78
},
9+
"parserOptions": { "ecmaVersion": 2017 },
810
"rules": {
911
"quotes": ["error", "double"],
1012
"no-undef": "error",
@@ -26,7 +28,7 @@
2628
"space-in-parens": "error",
2729
"no-trailing-spaces": "error",
2830
"no-use-before-define": "off",
29-
"no-unused-vars": ["error", {"args": "none"}],
31+
"no-unused-vars": ["error", { "args": "none" }],
3032
"key-spacing": "error",
3133
"space-infix-ops": "error",
3234
"no-unsafe-negation": "error",
@@ -37,17 +39,31 @@
3739
"keyword-spacing": ["error", {
3840
"after": false,
3941
"overrides": {
40-
"try": {"after": true},
41-
"else": {"after": true},
42-
"throw": {"after": true},
43-
"case": {"after": true},
44-
"return": {"after": true},
45-
"finally": {"after": true},
46-
"do": {"after": true}
42+
"const": { "after": true },
43+
"try": { "after": true },
44+
"else": { "after": true },
45+
"throw": { "after": true },
46+
"case": { "after": true },
47+
"return": { "after": true },
48+
"finally": { "after": true },
49+
"do": { "after": true }
4750
}
4851
}],
4952
"no-console": "off",
50-
"valid-jsdoc": "error"
53+
"valid-jsdoc": "error",
54+
"node/no-unsupported-features": ["error", { version: 4 }],
55+
"node/no-deprecated-api": "error",
56+
"node/no-missing-import": "error",
57+
"node/no-missing-require": [
58+
"error",
59+
{
60+
"allowModules": [
61+
"webpack"
62+
]
63+
}
64+
],
65+
"node/no-unpublished-bin": "error",
66+
"node/no-unpublished-require": "error",
67+
"node/process-exit-as-throw": "error"
5168
}
52-
}
53-
69+
};

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
[![tests][tests]][tests-url]
55
[![builds][builds]][builds-url]
66
[![coverage][cover]][cover-url]
7+
[![licenses][licenses]][licenses-url]
78

89
<div align="center">
910
<a href="https://github.com/webpack/webpack">
@@ -255,6 +256,10 @@ You are also welcome to correct any spelling mistakes or any language issues.
255256

256257
If you want to discuss something or just need help, [here is our Gitter room](https://gitter.im/webpack/webpack).
257258

259+
### License
260+
261+
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fwebpack%2Fwebpack.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fwebpack%2Fwebpack?ref=badge_large)
262+
258263
<h2 align="center">Core Team</h2>
259264

260265
<table>
@@ -511,5 +516,8 @@ src="https://static.monei.net/monei-logo.svg" height="30" alt="MONEI"></a>
511516
[builds-url]: https://ci.appveyor.com/project/sokra/webpack/branch/master
512517
[builds]: https://ci.appveyor.com/api/projects/status/github/webpack/webpack?svg=true
513518

519+
[licenses-url]: https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fwebpack%2Fwebpack?ref=badge_shield
520+
[licenses]: https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fwebpack%2Fwebpack.svg?type=shield
521+
514522
[cover]: https://img.shields.io/coveralls/webpack/webpack.svg
515523
[cover-url]: https://coveralls.io/r/webpack/webpack/

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ install:
2222
- ps: Install-Product node $env:nodejs_version x64
2323
- npm install yarn -g
2424
- yarn install
25-
- yarn link
25+
- yarn link || yarn link
2626
- yarn link webpack
2727

2828
build: off

circle.yml

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,23 @@
1-
general:
2-
artifacts:
3-
- "./coverage"
1+
machine:
2+
environment:
3+
NO_WATCH_TESTS: 1
44

55
machine:
6-
node:
7-
version: 4.7.0
6+
environment:
7+
PATH: "${PATH}:${HOME}/${CIRCLE_PROJECT_REPONAME}/node_modules/.bin"
88

99
dependencies:
1010
pre:
11-
- npm install -g yarn
11+
- case $CIRCLE_NODE_INDEX in 0) NODE_VERSION=4 ;; 1) NODE_VERSION=7 ;; esac; nvm install $NODE_VERSION && nvm alias default $NODE_VERSION
1212
override:
13-
- yarn install
14-
post:
13+
- yarn
1514
- yarn link || true && yarn link webpack
15+
cache_directories:
16+
- ~/.cache/yarn
1617

1718
test:
18-
pre:
19-
- npm run travis:lint
2019
override:
21-
- npm run travis:test:
22-
parallel: true
23-
files:
24-
- test/ConfigTestCases.test.js
25-
- test/TestCases.test.js
26-
- test/Stats.test.js
27-
- test/**/*.test.js
20+
- node -v
21+
- yarn --version
22+
- yarn run circleci:lint
23+
- yarn run circleci:test

examples/common-chunk-and-vendor-chunk/README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,31 @@ This example shows how to create an explicit vendor chunk as well as a common ch
33
To better understand, here are the entry points and which utility modules they depend on:
44

55
- `pageA`
6-
- `utility1`
7-
- `utility2`
6+
- `utility1`
7+
- `utility2`
88
- `pageB`
9-
- `utility2`
10-
- `utility3`
9+
- `utility2`
10+
- `utility3`
1111
- `pageC`
12-
- `utility2`
13-
- `utility3`
12+
- `utility2`
13+
- `utility3`
1414

1515
Given this configuration, webpack will produce the following bundles:
1616

1717
- `vendor`
18-
- webpack runtime
19-
- `vendor1`
20-
- `vendor2`
18+
- webpack runtime
19+
- `vendor1`
20+
- `vendor2`
2121
- `common`
22-
- `utility2`
23-
- `utility3`
22+
- `utility2`
23+
- `utility3`
2424
- `pageA`
25-
- `pageA`
26-
- `utility1`
25+
- `pageA`
26+
- `utility1`
2727
- `pageB`
28-
- `pageB`
28+
- `pageB`
2929
- `pageC`
30-
- `pageC`
30+
- `pageC`
3131

3232
With this bundle configuration, you would load your third party libraries, then your common application code, then your page-specific application code.
3333

examples/common-chunk-and-vendor-chunk/template.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,31 @@ This example shows how to create an explicit vendor chunk as well as a common ch
33
To better understand, here are the entry points and which utility modules they depend on:
44

55
- `pageA`
6-
- `utility1`
7-
- `utility2`
6+
- `utility1`
7+
- `utility2`
88
- `pageB`
9-
- `utility2`
10-
- `utility3`
9+
- `utility2`
10+
- `utility3`
1111
- `pageC`
12-
- `utility2`
13-
- `utility3`
12+
- `utility2`
13+
- `utility3`
1414

1515
Given this configuration, webpack will produce the following bundles:
1616

1717
- `vendor`
18-
- webpack runtime
19-
- `vendor1`
20-
- `vendor2`
18+
- webpack runtime
19+
- `vendor1`
20+
- `vendor2`
2121
- `common`
22-
- `utility2`
23-
- `utility3`
22+
- `utility2`
23+
- `utility3`
2424
- `pageA`
25-
- `pageA`
26-
- `utility1`
25+
- `pageA`
26+
- `utility1`
2727
- `pageB`
28-
- `pageB`
28+
- `pageB`
2929
- `pageC`
30-
- `pageC`
30+
- `pageC`
3131

3232
With this bundle configuration, you would load your third party libraries, then your common application code, then your page-specific application code.
3333

examples/dll-user/README.md

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# DllUser
2+
3+
[DllPlugin documentation](https://webpack.js.org/plugins/dll-plugin)
4+
5+
This is the _user_ bundle, which uses the manifest from [dll-reference example](https://github.com/webpack/webpack/tree/master/examples/dll)
6+
17
# webpack.config.js
28

39
``` javascript
@@ -44,9 +50,9 @@ console.log(require("module"));
4450
/******/ function __webpack_require__(moduleId) {
4551
/******/
4652
/******/ // Check if module is in cache
47-
/******/ if(installedModules[moduleId])
53+
/******/ if(installedModules[moduleId]) {
4854
/******/ return installedModules[moduleId].exports;
49-
/******/
55+
/******/ }
5056
/******/ // Create a new module (and put it into the cache)
5157
/******/ var module = installedModules[moduleId] = {
5258
/******/ i: moduleId,
@@ -223,12 +229,12 @@ console.log(__webpack_require__(/*! module */ 7));
223229
## Uncompressed
224230

225231
```
226-
Hash: 164f3c4abb86bb4c4462
227-
Version: webpack 2.3.2
232+
Hash: 31b432da9b9102c24f82
233+
Version: webpack 2.4.1
228234
Asset Size Chunks Chunk Names
229235
output.js 6.16 kB 0 [emitted] main
230236
Entrypoint main = output.js
231-
chunk {0} output.js (main) 549 bytes [entry] [rendered]
237+
chunk {0} output.js (main) 541 bytes [entry] [rendered]
232238
> main [8] ./example.js
233239
[2] delegated ./a.js from dll-reference alpha_282e8826843b2bb4eeb1 42 bytes {0} [not cacheable] [built]
234240
cjs require ../dll/a [8] ./example.js 2:12-31
@@ -242,19 +248,19 @@ chunk {0} output.js (main) 549 bytes [entry] [rendered]
242248
cjs require beta/c [8] ./example.js 6:12-29
243249
[7] delegated ../node_modules/module.js from dll-reference alpha_282e8826843b2bb4eeb1 42 bytes {0} [not cacheable] [built]
244250
cjs require module [8] ./example.js 8:12-29
245-
[8] ./example.js 213 bytes {0} [built]
251+
[8] ./example.js 205 bytes {0} [built]
246252
+ 2 hidden modules
247253
```
248254

249255
## Minimized (uglify-js, no zip)
250256

251257
```
252-
Hash: 164f3c4abb86bb4c4462
253-
Version: webpack 2.3.2
258+
Hash: 31b432da9b9102c24f82
259+
Version: webpack 2.4.1
254260
Asset Size Chunks Chunk Names
255-
output.js 937 bytes 0 [emitted] main
261+
output.js 930 bytes 0 [emitted] main
256262
Entrypoint main = output.js
257-
chunk {0} output.js (main) 549 bytes [entry] [rendered]
263+
chunk {0} output.js (main) 541 bytes [entry] [rendered]
258264
> main [8] ./example.js
259265
[2] delegated ./a.js from dll-reference alpha_282e8826843b2bb4eeb1 42 bytes {0} [not cacheable] [built]
260266
cjs require ../dll/a [8] ./example.js 2:12-31
@@ -268,6 +274,6 @@ chunk {0} output.js (main) 549 bytes [entry] [rendered]
268274
cjs require beta/c [8] ./example.js 6:12-29
269275
[7] delegated ../node_modules/module.js from dll-reference alpha_282e8826843b2bb4eeb1 42 bytes {0} [not cacheable] [built]
270276
cjs require module [8] ./example.js 8:12-29
271-
[8] ./example.js 213 bytes {0} [built]
277+
[8] ./example.js 205 bytes {0} [built]
272278
+ 2 hidden modules
273-
```
279+
```

examples/dll-user/template.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# DllUser
2+
3+
[DllPlugin documentation](https://webpack.js.org/plugins/dll-plugin)
4+
5+
This is the _user_ bundle, which uses the manifest from [dll-reference example](https://github.com/webpack/webpack/tree/master/examples/dll)
6+
17
# webpack.config.js
28

39
``` javascript
@@ -28,4 +34,4 @@
2834

2935
```
3036
{{min:stdout}}
31-
```
37+
```

examples/dll/README.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# DllReference
2+
3+
[DllPlugin documentation](https://webpack.js.org/plugins/dll-plugin)
4+
5+
This is the _reference_ bundle (with the manifests) for [dll user example](https://github.com/webpack/webpack/tree/master/examples/dll-user)
6+
7+
18
# webpack.config.js
29

310
``` javascript
@@ -41,9 +48,9 @@ var alpha_282e8826843b2bb4eeb1 =
4148
/******/ function __webpack_require__(moduleId) {
4249
/******/
4350
/******/ // Check if module is in cache
44-
/******/ if(installedModules[moduleId])
51+
/******/ if(installedModules[moduleId]) {
4552
/******/ return installedModules[moduleId].exports;
46-
/******/
53+
/******/ }
4754
/******/ // Create a new module (and put it into the cache)
4855
/******/ var module = installedModules[moduleId] = {
4956
/******/ i: moduleId,
@@ -185,9 +192,9 @@ module.exports = __webpack_require__;
185192

186193
```
187194
Hash: 282e8826843b2bb4eeb1
188-
Version: webpack 2.3.2
195+
Version: webpack 2.4.1
189196
Asset Size Chunks Chunk Names
190-
MyDll.beta.js 3.46 kB 0 [emitted] beta
197+
MyDll.beta.js 3.47 kB 0 [emitted] beta
191198
MyDll.alpha.js 3.49 kB 1 [emitted] alpha
192199
Entrypoint alpha = MyDll.alpha.js
193200
Entrypoint beta = MyDll.beta.js
@@ -215,7 +222,7 @@ chunk {1} MyDll.alpha.js (alpha) 84 bytes [entry] [rendered]
215222

216223
```
217224
Hash: 282e8826843b2bb4eeb1
218-
Version: webpack 2.3.2
225+
Version: webpack 2.4.1
219226
Asset Size Chunks Chunk Names
220227
MyDll.beta.js 653 bytes 0 [emitted] beta
221228
MyDll.alpha.js 657 bytes 1 [emitted] alpha
@@ -239,4 +246,4 @@ chunk {1} MyDll.alpha.js (alpha) 84 bytes [entry] [rendered]
239246
[5] ../~/module.js 26 bytes {1} [built]
240247
single entry module [6] dll alpha alpha:2
241248
[6] dll alpha 12 bytes {1} [built]
242-
```
249+
```

examples/dll/template.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# DllReference
2+
3+
[DllPlugin documentation](https://webpack.js.org/plugins/dll-plugin)
4+
5+
This is the _reference_ bundle (with the manifests) for [dll user example](https://github.com/webpack/webpack/tree/master/examples/dll-user)
6+
7+
18
# webpack.config.js
29

310
``` javascript
@@ -28,4 +35,4 @@
2835

2936
```
3037
{{min:stdout}}
31-
```
38+
```

0 commit comments

Comments
 (0)