Skip to content

Commit 7bc5c98

Browse files
committed
Merge branch 'master' into marcusdarmstrong-external-module-fix
2 parents 5853ec5 + 2228daf commit 7bc5c98

File tree

517 files changed

+18311
-8081
lines changed

Some content is hidden

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

517 files changed

+18311
-8081
lines changed

.editorconfig

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@ trim_trailing_whitespace = true
88
insert_final_newline = true
99
max_line_length = 80
1010

11-
[.prettierrc]
12-
indent_style = space
13-
indent_size = 2
14-
1511
[*.{yml,yaml,json}]
1612
indent_style = space
1713
indent_size = 2

.eslintrc.js

Lines changed: 31 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
module.exports = {
22
root: true,
33
plugins: ["prettier", "node", "jest"],
4-
extends: ["eslint:recommended", "plugin:node/recommended", "plugin:prettier/recommended"],
4+
extends: [
5+
"eslint:recommended",
6+
"plugin:node/recommended",
7+
"plugin:prettier/recommended"
8+
],
59
env: {
610
node: true,
711
es6: true
@@ -16,33 +20,37 @@ module.exports = {
1620
"no-template-curly-in-string": "error",
1721
"no-caller": "error",
1822
"no-control-regex": "off",
19-
"yoda": "error",
20-
"eqeqeq": "error",
23+
yoda: "error",
24+
eqeqeq: "error",
2125
"global-require": "off",
22-
"brace-style": "error",
26+
"brace-style": "off",
2327
"eol-last": "error",
2428
"no-extra-bind": "warn",
2529
"no-process-exit": "warn",
2630
"no-use-before-define": "off",
2731
"no-unused-vars": ["error", { args: "none" }],
2832
"no-unsafe-negation": "error",
2933
"no-loop-func": "warn",
30-
"indent": "off",
34+
indent: "off",
3135
"no-console": "off",
32-
"valid-jsdoc": ["error", {
33-
"prefer": {
34-
"return": "returns",
35-
"memberof": "DONTUSE",
36-
"class": "DONTUSE",
37-
"inheritdoc": "DONTUSE",
38-
"description": "DONTUSE",
39-
"readonly": "DONTUSE"
40-
},
41-
"preferType": {
42-
"*": "any"
43-
},
44-
"requireReturnType": true
45-
}],
36+
"valid-jsdoc": [
37+
"error",
38+
{
39+
prefer: {
40+
return: "returns",
41+
prop: "property",
42+
memberof: "DONTUSE",
43+
class: "DONTUSE",
44+
inheritdoc: "DONTUSE",
45+
description: "DONTUSE",
46+
readonly: "DONTUSE"
47+
},
48+
preferType: {
49+
"*": "any"
50+
},
51+
requireReturnType: true
52+
}
53+
],
4654
"node/no-unsupported-features": "error",
4755
"node/no-deprecated-api": "error",
4856
"node/no-missing-import": "error",
@@ -59,7 +67,7 @@ module.exports = {
5967
browser: true
6068
},
6169
globals: {
62-
Promise: false,
70+
Promise: false
6371
},
6472
parserOptions: {
6573
ecmaVersion: 5
@@ -69,6 +77,9 @@ module.exports = {
6977
files: ["test/**/*.js"],
7078
env: {
7179
"jest/globals": true
80+
},
81+
globals: {
82+
nsObj: false
7283
}
7384
}
7485
]

.github/ISSUE_TEMPLATE/Bug_report.md

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
1-
---
2-
name: Bug report
3-
about: Create a report to help us improve
4-
---
5-
6-
<!-- Please don't delete this template because we'll close your issue -->
7-
<!-- Before creating an issue please make sure you are using the latest version of webpack. -->
8-
9-
# Bug report
10-
11-
<!-- Please ask questions on StackOverflow or the webpack Gitter. -->
12-
<!-- https://stackoverflow.com/questions/ask?tags=webpack -->
13-
<!-- https://gitter.im/webpack/webpack -->
14-
<!-- Issues which contain questions or support requests will be closed. -->
15-
16-
**What is the current behavior?**
17-
18-
19-
**If the current behavior is a bug, please provide the steps to reproduce.**
20-
21-
22-
<!-- A great way to do this is to provide your configuration via a GitHub repository -->
23-
<!-- The most helpful is a minimal reproduction with instructions on how to reproduce -->
24-
<!-- Repositories with too many files or large `webpack.config.js` files are not suitable -->
25-
<!-- Please only add small code snippets directly into this issue -->
26-
<!-- https://gist.github.com is a good place for longer code snippets -->
27-
<!-- If your issue is caused by a plugin or loader, please create an issue on the loader/plugin repository instead -->
28-
29-
**What is the expected behavior?**
30-
31-
32-
<!-- "It should work" is not a helpful explanation -->
33-
<!-- Explain exactly how it should behave -->
34-
35-
**Other relevant information:**
36-
webpack version:
37-
Node.js version:
38-
Operating System:
39-
Additional tools:
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
---
5+
6+
<!-- Please don't delete this template because we'll close your issue -->
7+
<!-- Before creating an issue please make sure you are using the latest version of webpack. -->
8+
9+
# Bug report
10+
11+
<!-- Please ask questions on StackOverflow or the webpack Gitter. -->
12+
<!-- https://stackoverflow.com/questions/ask?tags=webpack -->
13+
<!-- https://gitter.im/webpack/webpack -->
14+
<!-- Issues which contain questions or support requests will be closed. -->
15+
16+
**What is the current behavior?**
17+
18+
19+
**If the current behavior is a bug, please provide the steps to reproduce.**
20+
21+
22+
<!-- A great way to do this is to provide your configuration via a GitHub repository -->
23+
<!-- The most helpful is a minimal reproduction with instructions on how to reproduce -->
24+
<!-- Repositories with too many files or large `webpack.config.js` files are not suitable -->
25+
<!-- Please only add small code snippets directly into this issue -->
26+
<!-- https://gist.github.com is a good place for longer code snippets -->
27+
<!-- If your issue is caused by a plugin or loader, please create an issue on the loader/plugin repository instead -->
28+
29+
**What is the expected behavior?**
30+
31+
32+
<!-- "It should work" is not a helpful explanation -->
33+
<!-- Explain exactly how it should behave -->
34+
35+
**Other relevant information:**
36+
webpack version:
37+
Node.js version:
38+
Operating System:
39+
Additional tools:
Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
---
2-
name: Feature request
3-
about: Suggest an idea for this project
4-
5-
---
6-
7-
<!-- Please don't delete this template or we'll close your issue -->
8-
9-
## Feature request
10-
11-
<!-- Issues which contain questions or support requests will be closed. -->
12-
<!-- Before creating an issue please make sure you are using the latest version of webpack. -->
13-
<!-- Check if this feature need to be implemented in a plugin or loader instead -->
14-
<!-- If yes: file the issue on the plugin/loader repo -->
15-
<!-- Features related to the development server should be filed on this repo instead -->
16-
17-
**What is the expected behavior?**
18-
19-
20-
**What is motivation or use case for adding/changing the behavior?**
21-
22-
23-
**How should this be implemented in your opinion?**
24-
25-
26-
**Are you willing to work on this yourself?**
27-
yes
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
5+
---
6+
7+
<!-- Please don't delete this template or we'll close your issue -->
8+
9+
## Feature request
10+
11+
<!-- Issues which contain questions or support requests will be closed. -->
12+
<!-- Before creating an issue please make sure you are using the latest version of webpack. -->
13+
<!-- Check if this feature need to be implemented in a plugin or loader instead -->
14+
<!-- If yes: file the issue on the plugin/loader repo -->
15+
<!-- Features related to the development server should be filed on this repo instead -->
16+
17+
**What is the expected behavior?**
18+
19+
20+
**What is motivation or use case for adding/changing the behavior?**
21+
22+
23+
**How should this be implemented in your opinion?**
24+
25+
26+
**Are you willing to work on this yourself?**
27+
yes

.github/ISSUE_TEMPLATE/Other.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
---
2-
name: Other
3-
about: Something else
4-
5-
---
6-
7-
<!-- Bug reports and Feature requests must use other templates, or will be closed -->
8-
<!-- Please ask questions on StackOverflow or the webpack Gitter (https://gitter.im/webpack/webpack). -->
9-
<!-- Issues which contain questions or support requests will be closed. -->
1+
---
2+
name: Other
3+
about: Something else
4+
5+
---
6+
7+
<!-- Bug reports and Feature requests must use other templates, or will be closed -->
8+
<!-- Please ask questions on StackOverflow or the webpack Gitter (https://gitter.im/webpack/webpack). -->
9+
<!-- Issues which contain questions or support requests will be closed. -->

.prettierignore

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
1-
# Ignore all paths.
2-
**/*.*
3-
4-
# Enable prettier for the following paths.
5-
!setup/**/*.js
6-
!lib/**/*.js
7-
!bin/*.js
8-
!hot/*.js
9-
!buildin/*.js
10-
!benchmark/**/*.js
1+
# Ignore test fixtures
2+
test
113
!test/*.js
124
!test/**/webpack.config.js
5+
6+
# Ignore example fixtures
7+
examples
138
!examples/**/webpack.config.js
14-
!schemas/**/*.js
15-
!declarations.d.ts

.prettierrc.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
module.exports = {
22
printWidth: 80,
33
useTabs: true,
4-
tabWidth: 2
4+
tabWidth: 2,
5+
overrides: [
6+
{
7+
files: "*.json",
8+
options: {
9+
useTabs: false
10+
}
11+
}
12+
]
513
};

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ work is not in vain.
77

88
## Issues
99

10-
Most of the time, if webpack is not working correctly for you it is a simple configuration issue.
10+
Most of the time, if webpack is not working correctly for you, it is a simple configuration issue.
1111

1212
If you are still having difficulty after looking over your configuration carefully, please post
1313
a question to [StackOverflow with the webpack tag](http://stackoverflow.com/tags/webpack). Questions
@@ -35,11 +35,11 @@ If you have created your own loader/plugin please include it on the relevant doc
3535

3636
## Submitting Changes
3737

38-
After getting some feedback, push to your fork and submit a pull request. We
38+
After getting some feedbacks, push to your fork and submit a pull request. We
3939
may suggest some changes or improvements or alternatives, but for small changes
4040
your pull request should be accepted quickly.
4141

42-
Some things that will increase the chance that your pull request is accepted:
42+
Something that will increase the chance that your pull request is accepted:
4343

4444
* [Write tests](./test/README.md)
4545
* Follow the existing coding style

README.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,14 @@
1111
[![deps][deps]][deps-url]
1212
[![tests][tests]][tests-url]
1313
[![builds][builds]][builds-url]
14+
[![builds2][builds2]][builds2-url]
1415
[![coverage][cover]][cover-url]
1516
[![licenses][licenses]][licenses-url]
1617

1718
<br>
19+
<a href="https://dependabot.com/compatibility-score.html?dependency-name=webpack&package-manager=npm_and_yarn&new-version=latest">
20+
<img src="https://api.dependabot.com/badges/compatibility_score?dependency-name=webpack&package-manager=npm_and_yarn&version-scheme=semver&target-version=latest">
21+
</a>
1822
<a href="https://npmcharts.com/compare/webpack?minimal=true">
1923
<img src="https://img.shields.io/npm/dm/webpack.svg">
2024
</a>
@@ -55,8 +59,6 @@ yarn add webpack --dev
5559

5660
<h2 align="center">Introduction</h2>
5761

58-
> This README reflects webpack v2.x and v3.x. The webpack v1.x documentation has been deprecated and deleted.
59-
6062
webpack is a bundler for modules. The main purpose is to bundle JavaScript
6163
files for usage in a browser, yet it is also capable of transforming, bundling,
6264
or packaging just about any resource or asset.
@@ -89,16 +91,19 @@ within webpack itself use this plugin interface. This makes webpack very
8991

9092
|Name|Status|Install Size|Description|
9193
|:--:|:----:|:----------:|:----------|
92-
|[extract-text-webpack-plugin][extract]|![extract-npm]|![extract-size]|Extracts Text (CSS) from your bundles into a separate file (app.bundle.css)|
94+
|[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.|
9395
|[compression-webpack-plugin][compression]|![compression-npm]|![compression-size]|Prepares compressed versions of assets to serve them with Content-Encoding|
9496
|[i18n-webpack-plugin][i18n]|![i18n-npm]|![i18n-size]|Adds i18n support to your bundles|
9597
|[html-webpack-plugin][html-plugin]|![html-plugin-npm]|![html-plugin-size]| Simplifies creation of HTML files (`index.html`) to serve your bundles|
96-
98+
|[extract-text-webpack-plugin][extract]|![extract-npm]|![extract-size]|Extract text from a bundle, or bundles, into a separate file|
9799

98100
[common-npm]: https://img.shields.io/npm/v/webpack.svg
99101
[extract]: https://github.com/webpack/extract-text-webpack-plugin
100102
[extract-npm]: https://img.shields.io/npm/v/extract-text-webpack-plugin.svg
101103
[extract-size]: https://packagephobia.now.sh/badge?p=extract-text-webpack-plugin
104+
[mini-css]: https://github.com/webpack-contrib/mini-css-extract-plugin
105+
[mini-css-npm]: https://img.shields.io/npm/v/mini-css-extract-plugin.svg
106+
[mini-css-size]: https://packagephobia.now.sh/badge?p=mini-css-extract-plugin
102107
[component]: https://github.com/webpack/component-webpack-plugin
103108
[component-npm]: https://img.shields.io/npm/v/component-webpack-plugin.svg
104109
[component-size]: https://packagephobia.now.sh/badge?p=component-webpack-plugin
@@ -217,7 +222,7 @@ or are automatically applied via regex from your webpack configuration.
217222
|<a href="https://github.com/webpack/style-loader">`<style>`</a>|![style-npm]|![style-size]|Add exports of a module as style to DOM|
218223
|<a href="https://github.com/webpack/css-loader"><img width="48" height="48" src="https://worldvectorlogo.com/logos/css-3.svg"></a>|![css-npm]|![css-size]|Loads CSS file with resolved imports and returns CSS code|
219224
|<a href="https://github.com/webpack/less-loader"><img width="48" height="48" src="https://worldvectorlogo.com/logos/less-63.svg"></a>|![less-npm]|![less-size]|Loads and compiles a LESS file|
220-
|<a href="https://github.com/jtangelder/sass-loader"><img width="48" height="48" src="https://worldvectorlogo.com/logos/sass-1.svg"></a>|![sass-npm]|![sass-size]|Loads and compiles a SASS/SCSS file|
225+
|<a href="https://github.com/jtangelder/sass-loader"><img width="48" height="48" src="https://worldvectorlogo.com/logos/sass-1.svg"></a>|![sass-npm]|![sass-size]|Loads and compiles a Sass/SCSS file|
221226
|<a href="https://github.com/shama/stylus-loader"><img width="48" height="48" src="https://worldvectorlogo.com/logos/stylus.svg"></a>|![stylus-npm]|![stylus-size]|Loads and compiles a Stylus file|
222227
|<a href="https://github.com/postcss/postcss-loader"><img width="48" height="48" src="https://worldvectorlogo.com/logos/postcss.svg"></a>|![postcss-npm]|![postcss-size]|Loads and transforms a CSS/SSS file using [PostCSS](http://postcss.org)|
223228

@@ -748,6 +753,9 @@ src="https://static.monei.net/monei-logo.svg" height="30" alt="MONEI"></a>
748753
[builds-url]: https://ci.appveyor.com/project/sokra/webpack/branch/master
749754
[builds]: https://ci.appveyor.com/api/projects/status/github/webpack/webpack?svg=true
750755

756+
[builds2]: https://dev.azure.com/webpack/webpack/_apis/build/status/webpack.webpack
757+
[builds2-url]: https://dev.azure.com/webpack/webpack/_build/latest?definitionId=3
758+
751759
[licenses-url]: https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fwebpack%2Fwebpack?ref=badge_shield
752760
[licenses]: https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fwebpack%2Fwebpack.svg?type=shield
753761

_SETUP.md

Lines changed: 7 additions & 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
@@ -51,6 +51,12 @@ or in watch mode
5151
yarn test:unit --watch
5252
```
5353

54+
### To update Jest snapshots use
55+
56+
```bash
57+
yarn test:update-snapshots
58+
```
59+
5460
### To run code formatter (prettier) run
5561

5662
```bash

0 commit comments

Comments
 (0)