Skip to content

Commit 84d57e3

Browse files
authored
Merge branch 'master' into DefinePlugin-type
2 parents c3c4494 + aae20a8 commit 84d57e3

File tree

135 files changed

+3444
-1998
lines changed

Some content is hidden

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

135 files changed

+3444
-1998
lines changed

.eslintrc.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ module.exports = {
6161
browser: true
6262
},
6363
globals: {
64-
Promise: false,
64+
Promise: false
6565
},
6666
parserOptions: {
6767
ecmaVersion: 5
@@ -71,6 +71,9 @@ module.exports = {
7171
files: ["test/**/*.js"],
7272
env: {
7373
"jest/globals": true
74+
},
75+
globals: {
76+
nsObj: false
7477
}
7578
}
7679
]

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,16 +92,19 @@ within webpack itself use this plugin interface. This makes webpack very
9292

9393
|Name|Status|Install Size|Description|
9494
|:--:|:----:|:----------:|:----------|
95-
|[extract-text-webpack-plugin][extract]|![extract-npm]|![extract-size]|Extracts Text (CSS) from your bundles into a separate file (app.bundle.css)|
95+
|[mini-css-extract-plugin][mini-css]|![mini-css-npm]|![mini-css-size]|Extracts CSS into separate files. It creates a CSS file per JS file which contains CSS.|
9696
|[compression-webpack-plugin][compression]|![compression-npm]|![compression-size]|Prepares compressed versions of assets to serve them with Content-Encoding|
9797
|[i18n-webpack-plugin][i18n]|![i18n-npm]|![i18n-size]|Adds i18n support to your bundles|
9898
|[html-webpack-plugin][html-plugin]|![html-plugin-npm]|![html-plugin-size]| Simplifies creation of HTML files (`index.html`) to serve your bundles|
99-
99+
|[extract-text-webpack-plugin][extract]|![extract-npm]|![extract-size]|Extract text from a bundle, or bundles, into a separate file|
100100

101101
[common-npm]: https://img.shields.io/npm/v/webpack.svg
102102
[extract]: https://github.com/webpack/extract-text-webpack-plugin
103103
[extract-npm]: https://img.shields.io/npm/v/extract-text-webpack-plugin.svg
104104
[extract-size]: https://packagephobia.now.sh/badge?p=extract-text-webpack-plugin
105+
[mini-css]: https://github.com/webpack-contrib/mini-css-extract-plugin
106+
[mini-css-npm]: https://img.shields.io/npm/v/mini-css-extract-plugin.svg
107+
[mini-css-size]: https://packagephobia.now.sh/badge?p=mini-css-extract-plugin
105108
[component]: https://github.com/webpack/component-webpack-plugin
106109
[component-npm]: https://img.shields.io/npm/v/component-webpack-plugin.svg
107110
[component-size]: https://packagephobia.now.sh/badge?p=component-webpack-plugin

_SETUP.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ yarn link webpack
2727
yarn test
2828
```
2929

30-
### To run only intergration tests use
30+
### To run only integration tests use
3131

3232
```bash
3333
yarn test:integration

declarations.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ declare namespace NodeJS {
77
}
88
}
99

10-
1110
declare module "neo-async" {
1211
export interface Dictionary<T> {
1312
[key: string]: T;

examples/many-pages/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Info
22

3-
This example illustrates webpack's algorthim for automatic deduplication using `optimization.splitChunks`.
3+
This example illustrates webpack's algorithm for automatic deduplication using `optimization.splitChunks`.
44

55
This example application contains 7 pages, each of them importing 1-3 modules from the `node_modules` folder (vendor libs) and 0-3 modules from the `stuff` folder (application modules). In reallity an application is probably more complex, but the same mechanisms apply.
66

@@ -41,7 +41,7 @@ module.exports = {
4141
chunks: "all",
4242
maxInitialRequests: 20, // for HTTP2
4343
maxAsyncRequests: 20, // for HTTP2
44-
minSize: 40 // for example only: choosen to match 2 modules
44+
minSize: 40 // for example only: chosen to match 2 modules
4545
// omit minSize in real use case to use the default of 30kb
4646
}
4747
}

examples/many-pages/template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Info
22

3-
This example illustrates webpack's algorthim for automatic deduplication using `optimization.splitChunks`.
3+
This example illustrates webpack's algorithm for automatic deduplication using `optimization.splitChunks`.
44

55
This example application contains 7 pages, each of them importing 1-3 modules from the `node_modules` folder (vendor libs) and 0-3 modules from the `stuff` folder (application modules). In reallity an application is probably more complex, but the same mechanisms apply.
66

examples/many-pages/webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ module.exports = {
1414
chunks: "all",
1515
maxInitialRequests: 20, // for HTTP2
1616
maxAsyncRequests: 20, // for HTTP2
17-
minSize: 40 // for example only: choosen to match 2 modules
17+
minSize: 40 // for example only: chosen to match 2 modules
1818
// omit minSize in real use case to use the default of 30kb
1919
}
2020
}

hot/dev-server.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ if (module.hot) {
4040
"warning",
4141
"[HMR] Cannot apply update. Need to do a full reload!"
4242
);
43-
log("warning", "[HMR] " + err.stack || err.message);
43+
log("warning", "[HMR] " + (err.stack || err.message));
4444
window.___location.reload();
4545
} else {
46-
log("warning", "[HMR] Update failed: " + err.stack || err.message);
46+
log("warning", "[HMR] Update failed: " + (err.stack || err.message));
4747
}
4848
});
4949
};

hot/only-dev-server.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,11 @@ if (module.hot) {
7272
"warning",
7373
"[HMR] Cannot check for update. Need to do a full reload!"
7474
);
75-
log("warning", "[HMR] " + err.stack || err.message);
75+
log("warning", "[HMR] " + (err.stack || err.message));
7676
} else {
7777
log(
7878
"warning",
79-
"[HMR] Update check failed: " + err.stack || err.message
79+
"[HMR] Update check failed: " + (err.stack || err.message)
8080
);
8181
}
8282
});

hot/poll.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,13 @@ if (module.hot) {
2323
var status = module.hot.status();
2424
if (["abort", "fail"].indexOf(status) >= 0) {
2525
log("warning", "[HMR] Cannot apply update.");
26-
log("warning", "[HMR] " + err.stack || err.message);
26+
log("warning", "[HMR] " + (err.stack || err.message));
2727
log("warning", "[HMR] You need to restart the application!");
2828
} else {
29-
log("warning", "[HMR] Update failed: " + err.stack || err.message);
29+
log(
30+
"warning",
31+
"[HMR] Update failed: " + (err.stack || err.message)
32+
);
3033
}
3134
});
3235
}

0 commit comments

Comments
 (0)