Skip to content

Commit f876564

Browse files
committed
Merge branch 'master' into feat-rewrite-wasm
# Conflicts: # test/statsCases/aggressive-splitting-entry/expected.txt # test/statsCases/aggressive-splitting-on-demand/expected.txt # test/statsCases/chunks-development/expected.txt # test/statsCases/chunks/expected.txt # test/statsCases/import-context-filter/expected.txt # test/statsCases/import-weak/expected.txt # test/statsCases/limit-chunk-count-plugin/expected.txt # test/statsCases/module-assets/expected.txt # test/statsCases/named-chunks-plugin-async/expected.txt # test/statsCases/optimize-chunks/expected.txt # test/statsCases/preset-detailed/expected.txt # test/statsCases/preset-normal/expected.txt # test/statsCases/preset-verbose/expected.txt # test/statsCases/scope-hoisting-bailouts/expected.txt # test/statsCases/scope-hoisting-multi/expected.txt # yarn.lock
2 parents 96f7ba8 + ec83e8e commit f876564

293 files changed

Lines changed: 4125 additions & 2436 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.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,21 @@ module.exports = {
4343
{
4444
files: ["lib/**/*.runtime.js", "buildin/*.js", "hot/*.js"],
4545
env: {
46-
es6: false
46+
es6: false,
47+
browser: true
4748
},
4849
globals: {
4950
Promise: false,
5051
},
5152
parserOptions: {
5253
ecmaVersion: 5
5354
}
55+
},
56+
{
57+
files: ["test/**/*.js"],
58+
env: {
59+
mocha: true,
60+
}
5461
}
5562
]
5663
};

.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/*"

.npmrc

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

CONTRIBUTING.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,23 @@ Most of the time, if webpack is not working correctly for you it is a simple con
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
14-
that include your webpack.config.js and relevant files are more likely to receive responses.
14+
that include your webpack.config.js, relevant files, and the full error message are more likely to receive responses.
1515

1616
**If you have discovered a bug or have a feature suggestion, please [create an issue on GitHub](https://github.com/webpack/webpack/issues/new).**
1717

18+
Do you want to fix an issue? Look at the issues with a tag of [X5: work required (PR / Help Wanted)](https://github.com/webpack/webpack/labels/X5%3A%20work%20required%20%28PR%20%2F%20Help%20Wanted%29). Each issue should be tagged with a difficulty tag -
19+
20+
- D0: My First Commit (Contribution Difficulty)
21+
- D1: Easy (Contribution Difficulty)
22+
- D2: Medium (Contribution Difficulty)
23+
- D3: Hard (Contribution Difficulty)
24+
1825
## Contributing to the webpack ecosystem
1926

20-
If you have created your own loader/plugin please include it on the relevant
21-
documentation pages:
27+
If you have created your own loader/plugin please include it on the relevant documentation pages:
2228

23-
[List of loaders](https://webpack.js.org/loaders/) or [awesome-webpack](https://github.com/webpack-contrib/awesome-webpack#loaders)
24-
[List of plugins](https://webpack.js.org/plugins) or [awesome-webpack](https://github.com/webpack-contrib/awesome-webpack#webpack-plugins)
29+
- [List of loaders](https://webpack.js.org/loaders/) or [awesome-webpack](https://github.com/webpack-contrib/awesome-webpack#loaders)
30+
- [List of plugins](https://webpack.js.org/plugins) or [awesome-webpack](https://github.com/webpack-contrib/awesome-webpack#webpack-plugins)
2531

2632
## Setup
2733

@@ -43,7 +49,7 @@ Some things that will increase the chance that your pull request is accepted:
4349

4450
webpack is insanely feature rich and documentation is a huge time sink. We
4551
greatly appreciate any time spent fixing typos or clarifying sections in the
46-
documentation.
52+
documentation. [See a list of issues with the documentation tag.](https://github.com/webpack/webpack/labels/documentation)
4753

4854
## Discussions
4955

README.md

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ 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/)
@@ -324,18 +329,6 @@ If you have discovered a 🐜 or have a feature suggestion, feel free to create
324329
<br>
325330
<p>Founder of the core team</p>
326331
</td>
327-
<td align="center" valign="top">
328-
<img width="150" height="150" src="https://github.com/bebraw.png?s=150">
329-
<br>
330-
<a href="https://github.com/bebraw">Juho Vepsäläinen</a>
331-
<p>Documentation</p>
332-
<br>
333-
<p>Author</p>
334-
<a href="https://leanpub.com/survivejs-webpack">
335-
<img height="15" src="https://cloud.githubusercontent.com/assets/1365881/20286923/93e325c0-aac9-11e6-964d-cabe218c584c.png">
336-
</a>
337-
<br>
338-
</td>
339332
<td align="center" valign="top">
340333
<img width="150" height="150" src="https://github.com/spacek33z.png?s=150">
341334
<br>

SECURITY.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Reporting Security Issues
2+
3+
If you discover a security issue in webpack, please report it by sending an
4+
email to [webpack@opencollective.com](mailto:webpack@opencollective.com).
5+
6+
This will allow us to assess the risk, and make a fix available before we add a
7+
bug report to the GitHub repository.
8+
9+
Thanks for helping make webpack safe for everyone.

_SETUP.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,22 @@
11
# Setup
22

3-
Setup your local webpack repository
3+
At webpack we use `yarn` to execute commands.
4+
5+
If you already have `yarn` installed, do: `yarn setup`. This will complete all required steps.
6+
7+
If not, do: `npm run setup`, the setup will also install `yarn` for you.
8+
9+
That's all.
10+
11+
## Setup manually
12+
13+
Setup your local webpack repository
414

515
```bash
616
git clone https://github.com/webpack/webpack.git
717
cd webpack
818
npm install -g yarn
9-
yarn install
19+
yarn
1020
yarn link
1121
yarn link webpack
1222
```
@@ -15,4 +25,4 @@ To run the entire test suite use:
1525

1626
```bash
1727
yarn test
18-
```
28+
```

bin/webpack.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ function runCommand(command, options) {
33
const cp = require("child_process");
44
return new Promise((resolve, reject) => {
55
const executedCommand = cp.spawn(command, options, {
6-
stdio: "inherit"
6+
stdio: "inherit",
7+
shell: true
78
});
89

910
executedCommand.on("error", error => {
@@ -43,7 +44,7 @@ if (!webpackCliInstalled) {
4344

4445
const commandToBeRun = `${packageManager} ${options.join(" ")}`;
4546

46-
const question = `Would you like to install webpack-cli? (That will run ${commandToBeRun}) `;
47+
const question = `Would you like to install webpack-cli? (That will run ${commandToBeRun}) (yes/NO)`;
4748

4849
console.error("The CLI moved into a separate package: webpack-cli");
4950
const questionInterface = readLine.createInterface({

buildin/.eslintrc

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

0 commit comments

Comments
 (0)