Skip to content

Commit 0c29e0f

Browse files
authored
Merge branch 'master' into refactor-MultiStats
2 parents 920dfcf + 4a5d3dc commit 0c29e0f

423 files changed

Lines changed: 12398 additions & 7783 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.

‎.editorconfig‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ indent_size = 2
1616
indent_style = space
1717
indent_size = 2
1818

19+
[*.yaml]
20+
indent_style = space
21+
indent_size = 2
22+
1923
[test/cases/parsing/bom/bomfile.{css,js}]
2024
charset = utf-8-bom
2125

‎.travis.yml‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ matrix:
1515
- os: linux
1616
node_js: "7"
1717
env: NO_WATCH_TESTS=1 JOB_PART=lint
18-
- os: linux
19-
node_js: "7"
20-
env: NO_WATCH_TESTS=1 JOB_PART=benchmark
2118
- os: linux
2219
node_js: "7"
2320
env: NO_WATCH_TESTS=1 JOB_PART=test
@@ -32,7 +29,6 @@ matrix:
3229
env: NO_WATCH_TESTS=1 JOB_PART=test
3330
allow_failures:
3431
- os: osx
35-
- env: NO_WATCH_TESTS=1 JOB_PART=benchmark
3632
fast_finish: true
3733

3834
before_script:

‎CONTRIBUTING.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ that include your webpack.config.js and relevant files are more likely to receiv
2020
If you have created your own loader/plugin please include it on the relevant
2121
documentation pages:
2222

23-
[List of loaders](https://webpack.github.io/docs/list-of-loaders.html)
24-
[List of plugins](https://webpack.github.io/docs/list-of-plugins.html)
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)
2525

2626
## Setup
2727

‎README.md‎

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -134,16 +134,16 @@ or are automatically applied via regex from your webpack configuration.
134134
|:--:|:----:|:----------|
135135
|<a href="https://github.com/webpack/script-loader">`<script>`</a>|![script-npm]|Executes a JavaScript file once in global context (like in script tag), requires are not parsed|
136136
|<a href="https://github.com/babel/babel-loader"><img width="48" height="48" title="babel-loader" src="https://worldvectorlogo.com/logos/babel-10.svg"></a>|![babel-npm]|Loads ES2015+ code and transpiles to ES5 using <a href="https://github.com/babel/babel">Babel</a>|
137-
|<a href="https://github.com/jupl/traceur-loader"><img width="48" height="48" src="https://google.github.com/traceur-compiler/logo/tc.svg"></a>|![traceur-npm]|Loads ES2015+ code and transpiles to ES5 using [Traceur](https://github.com/google/traceur)|
138-
|<a href="https://github.com/andreypopp/typescript-loader"><img width="48" height="48" src="https://cdn.rawgit.com/Microsoft/TypeScript/master/doc/logo.svg"></a>|![type-npm]|Loads TypeScript like JavaScript|
137+
|<a href="https://github.com/jupl/traceur-loader"><img width="48" height="48" src="https://google.github.com/traceur-compiler/logo/tc.svg"></a>|![traceur-npm]|Loads ES2015+ code and transpiles to ES5 using [Traceur](https://github.com/google/traceur-compiler)|
138+
|<a href="https://github.com/TypeStrong/ts-loader"><img width="48" height="48" src="https://cdn.rawgit.com/Microsoft/TypeScript/master/doc/logo.svg"></a>|![type-npm]|Loads TypeScript like JavaScript|
139139
|<a href="https://github.com/webpack/coffee-loader"><img width="48" height="48" src="https://worldvectorlogo.com/logos/coffeescript.svg"></a>|![coffee-npm]|Loads CoffeeScript like JavaScript|
140140

141141

142142
[script-npm]: https://img.shields.io/npm/v/script-loader.svg
143143
[babel-npm]: https://img.shields.io/npm/v/babel-loader.svg
144144
[traceur-npm]: https://img.shields.io/npm/v/traceur-loader.svg
145145
[coffee-npm]: https://img.shields.io/npm/v/coffee-loader.svg
146-
[type-npm]: https://img.shields.io/npm/v/typescript-loader.svg
146+
[type-npm]: https://img.shields.io/npm/v/ts-loader.svg
147147

148148
#### Templating
149149

@@ -205,11 +205,14 @@ or are automatically applied via regex from your webpack configuration.
205205
|<a href="https://github.com/vuejs/vue-loader"><img width="48" height="48" src="https://worldvectorlogo.com/logos/vue-9.svg"></a>|![vue-npm]|Loads and compiles Vue Components|
206206
|<a href="https://github.com/JonDum/polymer-loader"><img width="48" height="48" src="https://worldvectorlogo.com/logos/polymer.svg"></a>|![polymer-npm]|Process HTML & CSS with preprocessor of choice and `require()` Web Components like first-class modules|
207207
|<a href="https://github.com/TheLarkInn/angular2-template-loader"><img width="48" height="48" src="https://worldvectorlogo.com/logos/angular-icon-1.svg"></a>|![angular-npm]| Loads and compiles Angular 2 Components|
208+
|<a href="https://github.com/riot/tag-loader"><img width="48" height="48" src="https://worldvectorlogo.com/logos/riot.svg"></a>|![riot-npm]| Riot official webpack loader|
209+
208210

209211

210212
[vue-npm]: https://img.shields.io/npm/v/vue-loader.svg
211213
[polymer-npm]: https://img.shields.io/npm/v/polymer-loader.svg
212214
[angular-npm]: https://img.shields.io/npm/v/angular2-template-loader.svg
215+
[riot-npm]: https://img.shields.io/npm/v/riot-tag-loader.svg
213216

214217
### Performance
215218

@@ -222,12 +225,12 @@ webpack supports ES2015+, CommonJS and AMD modules **out of the box**. It perfor
222225
analysis on the AST of your code. It even has an evaluation engine to evaluate
223226
simple expressions. This allows you to **support most existing libraries** out of the box.
224227

225-
### [Code Splitting](https://webpack.github.io/docs/code-splitting.html)
228+
### [Code Splitting](https://webpack.js.org/guides/code-splitting/)
226229

227230
webpack allows you to split your codebase into multiple chunks. Chunks are
228231
loaded asynchronously at runtime. This reduces the initial loading time.
229232

230-
### [Optimizations](https://webpack.github.io/docs/optimization.html)
233+
### [Optimizations](https://webpack.js.org/guides/production-build/)
231234

232235
webpack can do many optimizations to **reduce the output size of your
233236
JavaScript** by deduplicating frequently used modules, minifying, and giving
@@ -322,9 +325,21 @@ This is how we use the donations:
322325
* Infrastructure cost
323326
* Fees for money handling
324327

325-
### Early Backers and Sponsors
326328

327-
We had other sources of donations before starting to use OpenCollective. We want to acknowledge these early sponsors and backers, but donations were not public and we are not sure of donors want to stay anonymous. So if you want to be in this list, just drop @sokra a note via mail (`t____.k____@gmail.com`, insert fullname here).
329+
<h2 align="center">Premium Partners</h2>
330+
331+
<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">
332+
</a>
333+
334+
<h2 align="center">Other Backers and Sponsors</h2>
335+
336+
We had other sources of donations before starting to use OpenCollective (or people that can't donate via OpenCollective). We want to acknowledge these sponsors and backers, but donations were not public and we are not sure of donors want to stay anonymous. So if you want to be in this list, just send a PR.
337+
338+
[Google Angular Team](https://angular.io/), [Architects.io](http://architects.io/),
339+
<a href="https://moonmail.io" target="_blank" title="Email Marketing Software"><img
340+
src="https://static.moonmail.io/moonmail-logo.svg" height="30" alt="MoonMail"></a>
341+
<a href="https://monei.net" target="_blank" title="Best payment gateway rates"><img
342+
src="https://static.monei.net/monei-logo.svg" height="30" alt="MONEI"></a>
328343

329344
<h2 align="center">Sponsors</h2>
330345

‎appveyor.yml‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ environment:
1717
job_part: test
1818
- nodejs_version: 6
1919
job_part: test
20-
- nodejs_version: 7
21-
job_part: benchmark
2220

2321
install:
2422
- ps: Install-Product node $env:nodejs_version x64

‎bin/config-optimist.js‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module.exports = function(optimist) {
22
optimist
33
.boolean("help").alias("help", "h").alias("help", "?").describe("help")
44
.string("config").describe("config", "Path to the config file")
5-
.string("env").describe("env", "Enviroment passed to the config, when it is a function")
5+
.string("env").describe("env", "Environment passed to the config, when it is a function")
66
.string("context").describe("context", "The root directory for resolving entry point and stats")
77
.string("entry").describe("entry", "The entry point")
88
.string("module-bind").describe("module-bind", "Bind an extension to a loader")
@@ -21,7 +21,7 @@ module.exports = function(optimist) {
2121
.string("records-output-path").describe("records-output-path", "Path to the records file (writing)")
2222
.string("records-path").describe("records-path", "Path to the records file")
2323
.string("define").describe("define", "Define any free var in the bundle")
24-
.string("target").describe("target", "The targeted execution enviroment")
24+
.string("target").describe("target", "The targeted execution environment")
2525
.boolean("cache").describe("cache", "Enable in memory caching").default("cache", true)
2626
.boolean("watch").alias("watch", "w").describe("watch", "Watch the filesystem for changes")
2727
.boolean("watch-stdin").alias("watch-stdin", "stdin").describe("Exit the process when stdin is closed")
@@ -39,7 +39,6 @@ module.exports = function(optimist) {
3939
.boolean("optimize-minimize").describe("optimize-minimize", "Minimize javascript and switches loaders to minimizing")
4040
.string("prefetch").describe("prefetch", "Prefetch this request")
4141
.string("provide").describe("provide", "Provide these modules as free vars in all modules")
42-
.boolean("labeled-modules").describe("labeled-modules", "Enables labeled modules")
4342
.string("plugin").describe("plugin", "Load this plugin")
4443
.boolean("bail").describe("bail", "Abort the compilation on first error")
4544
.boolean("profile").describe("profile", "Profile the compilation and include information in stats")

‎bin/config-yargs.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ module.exports = function(yargs) {
2121
requiresArg: true
2222
},
2323
"env": {
24-
describe: "Enviroment passed to the config, when it is a function",
24+
describe: "Environment passed to the config, when it is a function",
2525
group: CONFIG_GROUP
2626
},
2727
"context": {
@@ -137,7 +137,7 @@ module.exports = function(yargs) {
137137
},
138138
"target": {
139139
type: "string",
140-
describe: "The targeted execution enviroment",
140+
describe: "The targeted execution environment",
141141
group: ADVANCED_GROUP,
142142
requiresArg: true
143143
},

‎bin/convert-argv.js‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,11 @@ module.exports = function(yargs, argv, convertOptions) {
275275
}
276276

277277
ifArgPair("entry", function(name, entry) {
278-
options.entry[name] = entry;
278+
if(typeof options.entry[name] !== "undefined" && options.entry[name] !== null) {
279+
options.entry[name] = [].concat(options.entry[name]).concat(entry);
280+
} else {
281+
options.entry[name] = entry;
282+
}
279283
}, function() {
280284
ensureObject(options, "entry");
281285
});
@@ -316,7 +320,7 @@ module.exports = function(yargs, argv, convertOptions) {
316320

317321
ifArg("output-path", function(value) {
318322
ensureObject(options, "output");
319-
options.output.path = value;
323+
options.output.path = path.resolve(value);
320324
});
321325

322326
ifArg("output-filename", function(value) {
@@ -478,11 +482,11 @@ module.exports = function(yargs, argv, convertOptions) {
478482
if(noOutputFilenameDefined) {
479483
ensureObject(options, "output");
480484
if(convertOptions && convertOptions.outputFilename) {
481-
options.output.path = path.dirname(convertOptions.outputFilename);
485+
options.output.path = path.resolve(path.dirname(convertOptions.outputFilename));
482486
options.output.filename = path.basename(convertOptions.outputFilename);
483487
} else if(argv._.length > 0) {
484488
options.output.filename = argv._.pop();
485-
options.output.path = path.dirname(options.output.filename);
489+
options.output.path = path.resolve(path.dirname(options.output.filename));
486490
options.output.filename = path.basename(options.output.filename);
487491
} else if(configFileLoaded) {
488492
throw new Error("'output.filename' is required, either in config file or as --output-filename");

‎bin/webpack.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ try {
1515
} catch(e) {}
1616
var yargs = require("yargs")
1717
.usage("webpack " + require("../package.json").version + "\n" +
18-
"Usage: https://webpack.github.io/docs/cli.html\n" +
18+
"Usage: https://webpack.js.org/api/cli/\n" +
1919
"Usage without config file: webpack <entry> [<entry>] <output>\n" +
2020
"Usage with config file: webpack");
2121

‎buildin/system.js‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// Provide a "System" global.
2+
module.exports = {
3+
// Make sure import is only used as "System.import"
4+
import: function() {
5+
throw new Error("System.import cannot be used indirectly");
6+
}
7+
};

0 commit comments

Comments
 (0)