Skip to content

Commit ec0dad4

Browse files
Merge remote-tracking branch 'upstream/master' into peer-dependencies-4
2 parents 324a86f + 10282ea commit ec0dad4

File tree

400 files changed

+5338
-3077
lines changed

Some content is hidden

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

400 files changed

+5338
-3077
lines changed

.editorconfig

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,11 @@ trim_trailing_whitespace = true
88
insert_final_newline = true
99
max_line_length = 233
1010

11-
[*.json]
12-
indent_style = space
13-
indent_size = 2
14-
1511
[.prettierrc]
1612
indent_style = space
1713
indent_size = 2
1814

19-
[*.yml]
20-
indent_style = space
21-
indent_size = 2
22-
23-
[*.yaml]
15+
[*.{yml,yaml,json}]
2416
indent_style = space
2517
indent_size = 2
2618

.eslintrc.js

Lines changed: 35 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
11
module.exports = {
2-
"root": true,
3-
"plugins": [
4-
"prettier",
5-
"node"
6-
],
7-
"extends": ["eslint:recommended", "plugin:node/recommended"],
8-
"env": {
9-
"node": true,
10-
"es6": true,
11-
"mocha": true,
2+
root: true,
3+
plugins: ["prettier", "node"],
4+
extends: ["eslint:recommended", "plugin:node/recommended", "plugin:prettier/recommended"],
5+
env: {
6+
node: true,
7+
es6: true
128
},
13-
"parserOptions": { "ecmaVersion": 2017 },
14-
"rules": {
9+
parserOptions: {
10+
ecmaVersion: 2017
11+
},
12+
rules: {
1513
"prettier/prettier": "error",
1614
"no-undef": "error",
1715
"no-extra-semi": "error",
1816
"semi": "error",
1917
"no-template-curly-in-string": "error",
2018
"no-caller": "error",
19+
"no-control-regex": "off",
2120
"yoda": "error",
2221
"eqeqeq": "error",
2322
"global-require": "off",
@@ -26,7 +25,7 @@ module.exports = {
2625
"no-extra-bind": "warn",
2726
"no-process-exit": "warn",
2827
"no-use-before-define": "off",
29-
"no-unused-vars": ["error", { "args": "none" }],
28+
"no-unused-vars": ["error", { args: "none" }],
3029
"no-unsafe-negation": "error",
3130
"no-loop-func": "warn",
3231
"indent": "off",
@@ -35,16 +34,30 @@ module.exports = {
3534
"node/no-unsupported-features": "error",
3635
"node/no-deprecated-api": "error",
3736
"node/no-missing-import": "error",
38-
"node/no-missing-require": [
39-
"error",
40-
{
41-
"allowModules": [
42-
"webpack"
43-
]
44-
}
45-
],
37+
"node/no-missing-require": ["error", { allowModules: ["webpack"] }],
4638
"node/no-unpublished-bin": "error",
4739
"node/no-unpublished-require": "error",
4840
"node/process-exit-as-throw": "error"
49-
}
41+
},
42+
overrides: [
43+
{
44+
files: ["lib/**/*.runtime.js", "buildin/*.js", "hot/*.js"],
45+
env: {
46+
es6: false,
47+
browser: true
48+
},
49+
globals: {
50+
Promise: false,
51+
},
52+
parserOptions: {
53+
ecmaVersion: 5
54+
}
55+
},
56+
{
57+
files: ["test/**/*.js"],
58+
env: {
59+
mocha: true,
60+
}
61+
}
62+
]
5063
};

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@
1010
*.log
1111
.idea
1212
.vscode
13+
package-lock.json

.istanbul.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
instrumentation:
22
excludes:
33
- "**/*.runtime.js"
4+
- ".github/*"

.jsbeautifyrc

Lines changed: 0 additions & 25 deletions
This file was deleted.

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package-lock=false

.prettierrc

Lines changed: 0 additions & 4 deletions
This file was deleted.

.prettierrc.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
printWidth: 80,
3+
useTabs: true,
4+
tabWidth: 2
5+
};

CONTRIBUTING.md

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,7 @@ documentation pages:
2525

2626
## Setup
2727

28-
```bash
29-
git clone https://github.com/webpack/webpack.git
30-
cd webpack
31-
npm install -g yarn
32-
yarn install
33-
yarn link
34-
yarn link webpack
35-
```
36-
37-
To run the entire test suite use:
38-
39-
```bash
40-
yarn test
41-
```
28+
[Setup your local webpack repository](_SETUP.md)
4229

4330
## Submitting Changes
4431

README.md

Lines changed: 17 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div align="center">
22
<a href="https://github.com/webpack/webpack">
3-
<img width="200" heigth="200" src="https://webpack.js.org/assets/icon-square-big.svg">
3+
<img width="200" height="200" src="https://webpack.js.org/assets/icon-square-big.svg">
44
</a>
55
<br>
66
<br>
@@ -15,7 +15,7 @@
1515
[![licenses][licenses]][licenses-url]
1616

1717
<br>
18-
<a href="https://npmjs.com/package/webpack">
18+
<a href="https://npmcharts.com/compare/webpack?minimal=true">
1919
<img src="https://img.shields.io/npm/dm/webpack.svg">
2020
</a>
2121
<a href="https://opencollective.com/webpack#backer">
@@ -33,7 +33,7 @@
3333
<h1>webpack</h1>
3434
<p>
3535
webpack is a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable of transforming, bundling, or packaging just about any resource or asset.
36-
<p>
36+
</p>
3737
</div>
3838

3939
<h2 align="center">Install</h2>
@@ -52,15 +52,15 @@ yarn add webpack --dev
5252

5353
<h2 align="center">Introduction</h2>
5454

55-
> This README reflects Webpack v2.x and v3.x. The Webpack v1.x documentation has been deprecated and deleted.
55+
> This README reflects webpack v2.x and v3.x. The webpack v1.x documentation has been deprecated and deleted.
5656
5757
webpack is a bundler for modules. The main purpose is to bundle JavaScript
5858
files for usage in a browser, yet it is also capable of transforming, bundling,
5959
or packaging just about any resource or asset.
6060

6161
**TL;DR**
6262

63-
* Bundles [ES Modules](http://www.2ality.com/2014/09/es6-modules-final.html), [CommonJS](http://wiki.commonjs.org/) and [AMD](https://github.com/amdjs/amdjs-api/wiki/AMD) modules (even combined).
63+
* Bundles [ES Modules](http://www.2ality.com/2014/09/es6-modules-final.html), [CommonJS](http://wiki.commonjs.org/), and [AMD](https://github.com/amdjs/amdjs-api/wiki/AMD) modules (even combined).
6464
* Can create a single bundle or multiple chunks that are asynchronously loaded at runtime (to reduce initial loading time).
6565
* Dependencies are resolved during compilation, reducing the runtime size.
6666
* Loaders can preprocess files while compiling, e.g. TypeScript to JavaScript, Handlebars strings to compiled functions, images to Base64, etc.
@@ -70,6 +70,11 @@ or packaging just about any resource or asset.
7070

7171
Check out webpack's quick [**Get Started**](https://webpack.js.org/get-started/) guide and the [other guides](https://webpack.js.org/guides/).
7272

73+
### Browser Compatibility
74+
75+
webpack supports all browsers that are [ES5-compliant](http://kangax.github.io/compat-table/es5/) (IE8 and below are not supported).
76+
webpack also needs `Promise` for `import()` and `require.ensure()`. If you want to support older browsers, you will need to [load a polyfill](https://webpack.js.org/guides/shimming/) before using these expressions.
77+
7378
<h2 align="center">Concepts</h2>
7479

7580
### [Plugins](https://webpack.js.org/plugins/)
@@ -81,14 +86,12 @@ within webpack itself use this plugin interface. This makes webpack very
8186

8287
|Name|Status|Description|
8388
|:--:|:----:|:----------|
84-
|[common-chunks-webpack-plugin][common]|![common-npm]|Generates chunks of common modules shared between entry points and splits them into separate bundles (e.g vendor.bundle.js && app.bundle.js)|
8589
|[extract-text-webpack-plugin][extract]|![extract-npm]|Extracts Text (CSS) from your bundles into a separate file (app.bundle.css)|
8690
|[compression-webpack-plugin][compression]|![compression-npm]|Prepares compressed versions of assets to serve them with Content-Encoding|
8791
|[i18n-webpack-plugin][i18n]|![i18n-npm]|Adds i18n support to your bundles|
8892
|[html-webpack-plugin][html-plugin]|![html-plugin-npm]| Simplifies creation of HTML files (`index.html`) to serve your bundles|
8993

9094

91-
[common]: https://github.com/webpack/webpack/blob/master/lib/optimize/CommonsChunkPlugin.js
9295
[common-npm]: https://img.shields.io/npm/v/webpack.svg
9396
[extract]: https://github.com/webpack/extract-text-webpack-plugin
9497
[extract-npm]: https://img.shields.io/npm/v/extract-text-webpack-plugin.svg
@@ -184,7 +187,7 @@ or are automatically applied via regex from your webpack configuration.
184187

185188
|Name|Status|Description|
186189
|:--:|:----:|:----------|
187-
|<a href="https://github.com/webpack/style-loader">`<style>`|![style-npm]|Add exports of a module as style to DOM|
190+
|<a href="https://github.com/webpack/style-loader">`<style>`</a>|![style-npm]|Add exports of a module as style to DOM|
188191
|<a href="https://github.com/webpack/css-loader"><img width="48" height="48" src="https://worldvectorlogo.com/logos/css-3.svg"></a>|![css-npm]|Loads CSS file with resolved imports and returns CSS code|
189192
|<a href="https://github.com/webpack/less-loader"><img width="48" height="48" src="https://worldvectorlogo.com/logos/less-63.svg"></a>|![less-npm]|Loads and compiles a LESS file|
190193
|<a href="https://github.com/jtangelder/sass-loader"><img width="48" height="48" src="https://worldvectorlogo.com/logos/sass-1.svg"></a>|![sass-npm]|Loads and compiles a SASS/SCSS file|
@@ -326,25 +329,13 @@ If you have discovered a 🐜 or have a feature suggestion, feel free to create
326329
<br>
327330
<p>Founder of the core team</p>
328331
</td>
329-
<td align="center" valign="top">
330-
<img width="150" height="150" src="https://github.com/bebraw.png?s=150">
331-
<br>
332-
<a href="https://github.com/bebraw">Juho Vepsäläinen</a>
333-
<p>Documentation</p>
334-
<br>
335-
<p>Author</p>
336-
<a href="https://leanpub.com/survivejs-webpack">
337-
<img height="15" src="https://cloud.githubusercontent.com/assets/1365881/20286923/93e325c0-aac9-11e6-964d-cabe218c584c.png">
338-
</a>
339-
<br>
340-
</td>
341332
<td align="center" valign="top">
342333
<img width="150" height="150" src="https://github.com/spacek33z.png?s=150">
343334
<br>
344335
<a href="https://github.com/spacek33z">Kees Kluskens</a>
345336
<p>Development</p>
346337
<br>
347-
<p>Sponsor<p>
338+
<p>Sponsor</p>
348339
<a href="https://codeyellow.nl/">
349340
<img height="15px" src="https://cloud.githubusercontent.com/assets/1365881/20286583/ad62eb04-aac7-11e6-9c14-a0fef35b9b56.png">
350341
</a>
@@ -371,7 +362,7 @@ This is how we use the donations:
371362
<h2 align="center">Premium Partners</h2>
372363

373364
<div align="center">
374-
365+
375366
<a href="https://www.ag-grid.com/?utm_source=webpack&utm_medium=banner&utm_campaign=sponsorship" target="_blank"><img align="center" src="https://raw.githubusercontent.com/webpack/media/2b399d58/horiz-banner-ad-ag-grid.png">
376367
</a>
377368

@@ -382,11 +373,11 @@ This is how we use the donations:
382373
Before we started using OpenCollective, donations were made anonymously. Now that we have made the switch, we would like to acknowledge these sponsors (and the ones who continue to donate using OpenCollective). If we've missed someone, please send us a PR, and we'll add you to this list.
383374

384375
<div align="center">
385-
376+
386377
[Google Angular Team](https://angular.io/), [Architects.io](http://architects.io/),
387-
<a href="https://moonmail.io" target="_blank" title="Email Marketing Software"><img
388-
src="https://static.moonmail.io/moonmail-logo.svg" height="30" alt="MoonMail"></a>
389-
<a href="https://monei.net" target="_blank" title="Best payment gateway rates"><img
378+
<a href="https://moonmail.io" target="_blank" title="Email Marketing Software"><img
379+
src="https://static.moonmail.io/moonmail-logo.svg" height="30" alt="MoonMail"></a>
380+
<a href="https://monei.net" target="_blank" title="Best payment gateway rates"><img
390381
src="https://static.monei.net/monei-logo.svg" height="30" alt="MONEI"></a>
391382

392383
</div>

0 commit comments

Comments
 (0)