Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: webpack/webpack
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: eeea490e8ec0e2341cd4bb6da82aabf6ca139322
Choose a base ref
...
head repository: webpack/webpack
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: bf4ec9c26e8f6de76c3d3ec1371f3ca1c8999ca5
Choose a head ref

Commits on Feb 1, 2017

  1. don't shorten node_modules to ~

    it's confusing
    sokra committed Feb 1, 2017
    Copy the full SHA
    dca8e62 View commit details

Commits on Apr 11, 2017

  1. Copy the full SHA
    26f79f5 View commit details

Commits on Apr 18, 2017

  1. use a Set for Module.chunks

    sokra committed Apr 18, 2017
    Copy the full SHA
    e8bc9c2 View commit details
  2. Copy the full SHA
    7ca1297 View commit details

Commits on Apr 19, 2017

  1. Sort by debug id and id

    sokra committed Apr 19, 2017
    Copy the full SHA
    aac0389 View commit details

Commits on Apr 21, 2017

  1. fix spacing issue

    sokra committed Apr 21, 2017
    Copy the full SHA
    616777b View commit details

Commits on Apr 22, 2017

  1. optimize variable

    sokra committed Apr 22, 2017
    Copy the full SHA
    df44599 View commit details

Commits on May 4, 2017

  1. assign correct records and cache to child compilations

    This is a breaking change because plugins or loader could rely on this incorrect behavior
    When using child compilations plugins and loaders should use a unique compiler name or use a consistent order
    
    fixes #2777
    sokra committed May 4, 2017
    Copy the full SHA
    101850c View commit details

Commits on May 16, 2017

  1. Copy the full SHA
    e1bac32 View commit details
  2. Merge pull request #4704 from webpack/bugfix/child-records-cache

    assign correct records and cache to child compilations
    sokra authored May 16, 2017
    Copy the full SHA
    ee541d9 View commit details
  3. Merge pull request #4764 from webpack/perf/chunks-set

    Use a Set to store modules in a chunk
    sokra authored May 16, 2017
    Copy the full SHA
    77a3c87 View commit details
  4. Copy the full SHA
    8d3efe7 View commit details
  5. test next branch too

    sokra committed May 16, 2017
    Copy the full SHA
    fba4e81 View commit details
  6. Merge pull request #4738 from webpack/perf/modules-set

    Performance by using Set instead of Arrays
    sokra authored May 16, 2017
    Copy the full SHA
    35ece08 View commit details

Commits on May 17, 2017

  1. Merge pull request #4144 from webpack/fix/node_modules_mangle

    don't shorten node_modules to ~
    sokra authored May 17, 2017
    Copy the full SHA
    2fa2f61 View commit details

Commits on May 20, 2017

  1. improve a few issues

    from review by @Kovensky
    sokra committed May 20, 2017
    Copy the full SHA
    2bd2d28 View commit details
  2. Merge pull request #4904 from webpack/cleanup/module-chunk

    improve a few issues in next branch
    sokra authored May 20, 2017
    Copy the full SHA
    325a5c4 View commit details

Commits on May 21, 2017

  1. Merge branch 'master' into next

    sokra committed May 21, 2017
    Copy the full SHA
    aeb9683 View commit details
  2. Scope Hoisting

    sokra committed May 21, 2017
    Copy the full SHA
    9b2a9fa View commit details
  3. Copy the full SHA
    c41ab08 View commit details
  4. improvements from review

    sokra committed May 21, 2017
    Copy the full SHA
    4a25a17 View commit details
  5. improvements from review

    sokra committed May 21, 2017
    Copy the full SHA
    5d9eef8 View commit details
  6. add module.strictThisContextOnImports option

    to allow spec-comforming behavior this context on
    called imported harmony functions
    sokra committed May 21, 2017
    Copy the full SHA
    d967a46 View commit details
  7. Copy the full SHA
    6b31b4e View commit details
  8. Copy the full SHA
    1ebca7e View commit details
  9. fix uglify test cases

    sokra committed May 21, 2017
    Copy the full SHA
    8d5a8da View commit details
  10. update stats snapshots

    sokra committed May 21, 2017
    Copy the full SHA
    2bc6662 View commit details
  11. Merge pull request #4873 from webpack/feature/scope-hoisting

    Scope Hoisting
    sokra authored May 21, 2017
    Copy the full SHA
    5d39385 View commit details
  12. add missing file

    sokra committed May 21, 2017
    Copy the full SHA
    9f8cdd2 View commit details
  13. Copy the full SHA
    b113a22 View commit details

Commits on May 22, 2017

  1. merge PR #4884 again

    sokra committed May 22, 2017
    Copy the full SHA
    1c3bef9 View commit details

Commits on May 24, 2017

  1. add test case

    sokra committed May 24, 2017
    Copy the full SHA
    1886105 View commit details
  2. Copy the full SHA
    b4d2520 View commit details

Commits on May 25, 2017

  1. fix browsertests

    sokra committed May 25, 2017
    Copy the full SHA
    6368dd0 View commit details

Commits on May 26, 2017

  1. Copy the full SHA
    5345a38 View commit details

Commits on May 28, 2017

  1. Merge pull request #4932 from jiyinyiyong/show-hot-only-error

    show error when hotOnly HMR fails
    sokra authored May 28, 2017
    Copy the full SHA
    5ca39aa View commit details
  2. Merge pull request #4939 from webpack/bugfix/browsertests

    fix browsertests
    sokra authored May 28, 2017
    Copy the full SHA
    b9ecbd7 View commit details
  3. Merge pull request #4907 from paraboom/feature/add_request_timeout_co…

    …nfigurable
    
    Make HMR request timeout configurable
    sokra authored May 28, 2017
    Copy the full SHA
    0257f6c View commit details
  4. add optimization bailout info

    track optimization bailout in concat plugin
    sokra committed May 28, 2017
    Copy the full SHA
    d853956 View commit details
  5. update graph correctly

    sokra committed May 28, 2017
    Copy the full SHA
    44bf6c2 View commit details
  6. add new hook to progress

    sokra committed May 28, 2017
    Copy the full SHA
    f1739f9 View commit details
  7. fixes for stats

    sokra committed May 28, 2017
    Copy the full SHA
    8b81788 View commit details
  8. Copy the full SHA
    ee6ce4f View commit details
  9. upgrade yarn lock

    sokra committed May 28, 2017
    Copy the full SHA
    9e9d7b8 View commit details
  10. Merge pull request #4952 from webpack/ci/freeze-yarn-lock

    use frozen lockfile to fail on outdated yarn.lock
    sokra authored May 28, 2017
    Copy the full SHA
    2774fcc View commit details
  11. spacing

    sokra committed May 28, 2017
    Copy the full SHA
    6a0e587 View commit details
  12. Merge pull request #4954 from webpack/ci/yarn-upgrade

    upgrade yarn lock
    sokra authored May 28, 2017
    Copy the full SHA
    057d8bc View commit details
  13. update ajv

    sokra committed May 28, 2017
    Copy the full SHA
    7143ad8 View commit details
  14. Merge branch 'master' into next

    # Conflicts:
    #	test/statsCases/commons-chunk-min-size-0/expected.txt
    #	test/statsCases/limit-chunk-count-plugin/expected.txt
    sokra committed May 28, 2017
    Copy the full SHA
    4901312 View commit details
  15. Copy the full SHA
    df7621a View commit details
Showing 341 changed files with 7,769 additions and 5,076 deletions.
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@ language: node_js
branches:
only:
- master
- next

cache:
directories:
@@ -13,10 +14,10 @@ cache:
matrix:
include:
- os: linux
node_js: "7"
node_js: "8"
env: NO_WATCH_TESTS=1 JOB_PART=lint
- os: linux
node_js: "7"
node_js: "8"
env: NO_WATCH_TESTS=1 JOB_PART=test
- os: linux
node_js: "6"
@@ -25,7 +26,7 @@ matrix:
node_js: "4.3"
env: NO_WATCH_TESTS=1 JOB_PART=test
- os: osx
node_js: "7"
node_js: "8"
env: NO_WATCH_TESTS=1 JOB_PART=test
allow_failures:
- os: osx
41 changes: 32 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -241,20 +241,43 @@ friendly** by using hashes.

<h2 align="center">Contributing</h2>

Most of the time, if webpack is not working correctly for you it is a simple configuration issue.
**We want contributing to webpack to be fun, enjoyable, and educational for anyone, and everyone.** We have a [vibrant ecosystem](https://medium.com/webpack/contributors-guide/home) that spans beyond this single repo. We welcome you to check out any of the repositories in [our organization](http://github.com/webpack) or [webpack-contrib organization](http://github.com/webpack-contrib) which houses all of our loaders and plugins.

If you are still having difficulty after looking over your configuration carefully, please post
a question to [StackOverflow with the webpack tag](https://stackoverflow.com/tags/webpack). Questions
that include your webpack.config.js and relevant files are more likely to receive responses.
Contributions go far beyond pull requests and commits. Although we love giving you the opportunity to put your stamp on webpack, we also are thrilled to receive a variety of other contributions including:

If you have discovered a bug or have a feature suggestion, feel free to create an issue on Github.
* [Documentation](https://github.com/webpack/webpack.js.org) updates, enhancements, designs, or bugfixes
* Spelling or grammar fixes
* README.md corrections or redesigns
* Adding unit, or functional tests
* Triaging GitHub issues -- especially determining whether an issue still persists or is reproducible.
* [Searching #webpack on twitter](https://twitter.com/search?q=webpack) and helping someone else who needs help
* Teaching others how to contribute to one of the many webpack repo's!
* [Blogging, speaking about, or creating tutorials](https://github.com/webpack-contrib/awesome-webpack) about one of webpack's many features.
* Helping others in our webpack [gitter channel](https://gitter.im/webpack/webpack).

If you create a loader or plugin, please consider open sourcing it, putting it
on npm and following the `x-loader`, `x-webpack-plugin` convention.
If you are worried or don't know where to start, you can **always** reach out to [Sean Larkin (@TheLarkInn) on Twitter](https://twitter.com/thelarkinn) or simply submit an issue and a maintainer can help give you guidance!

You are also welcome to correct any spelling mistakes or any language issues.
We have also started a series on our [Medium Publication](https://medium.com/webpack) called [The Contributor's Guide to webpack](https://medium.com/webpack/contributors-guide/home). We welcome you to read it and post any questions or responses if you still need help.

If you want to discuss something or just need help, [here is our Gitter room](https://gitter.im/webpack/webpack).
_Looking to speak about webpack?_ We'd **love** to review your talk abstract/CFP! You can email it to webpack [at] opencollective [dot] com and we can give pointers or tips!!!

<h3 align="center">Creating your own plugins and loaders</h3>
If you create a loader or plugin, we would <3 for you to open source it, and put it on npm. We follow the `x-loader`, `x-webpack-plugin` naming convention.

<h2 align="center">Support</h2>

We consider webpack to be a low-level tool used not only individuals but also layered beneath other awesome tools. Because of it's flexibility, webpack isn't always the _easiest_ entry-level solution, however we do believe it is the most powerful. That said, we're always looking for ways improve and simplify the tool without compromising functionality. If you have any ideas on ways to accomplish this, we're all ears!

If you're just getting started, take a look at [our new docs and concepts page](https://webpack.js.org/concepts/). This has a high level overview that is great for beginners!!

If you want to discuss something or just need help, [here is our Gitter room](https://gitter.im/webpack/webpack) where there are always individuals looking to help out!

If you are still having difficulty, we would love for you to post
a question to [StackOverflow with the webpack tag](https://stackoverflow.com/tags/webpack). It is much easier to answer questions that include your webpack.config.js and relevant files! So if you can provide them, we'd be extremely grateful (and more likely to help you find the answer!)

If you are twitter savvy you can tweet #webpack with your question and someone should be able to reach out and help also.

If you have discovered a 🐜 or have a feature suggestion, feel free to create an issue on Github.

### License

9 changes: 5 additions & 4 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@
branches:
only:
- master
- next

init:
- git config --global core.autocrlf input
@@ -13,17 +14,17 @@ clone_depth: 50
# what combinations to test
environment:
matrix:
- nodejs_version: 7
- nodejs_version: 8
job_part: test
- nodejs_version: 6
job_part: test

install:
- ps: Install-Product node $env:nodejs_version x64
- npm install yarn -g
- yarn install
- yarn link || yarn link
- yarn link webpack
- yarn install --frozen-lockfile
- yarn link --frozen-lockfile || yarn link --frozen-lockfile
- yarn link webpack --frozen-lockfile

build: off

80 changes: 45 additions & 35 deletions bin/webpack.js
100755 → 100644
Original file line number Diff line number Diff line change
@@ -124,11 +124,21 @@ yargs.options({
group: DISPLAY_GROUP,
describe: "Display information about exports provided from modules"
},
"display-optimization-bailout": {
type: "boolean",
group: DISPLAY_GROUP,
describe: "Display information about why optimization bailed out for modules"
},
"display-error-details": {
type: "boolean",
group: DISPLAY_GROUP,
describe: "Display details about errors"
},
"display": {
type: "string",
group: DISPLAY_GROUP,
describe: "Select display preset (verbose, detailed, normal, minimal, errors-only, none)"
},
"verbose": {
type: "boolean",
group: DISPLAY_GROUP,
@@ -139,15 +149,7 @@ yargs.options({
var argv = yargs.argv;

if(argv.verbose) {
argv["display-reasons"] = true;
argv["display-depth"] = true;
argv["display-entrypoints"] = true;
argv["display-used-exports"] = true;
argv["display-provided-exports"] = true;
argv["display-error-details"] = true;
argv["display-modules"] = true;
argv["display-cached"] = true;
argv["display-cached-assets"] = true;
argv["display"] = "verbose";
}

var options = require("./convert-argv")(yargs, argv);
@@ -181,6 +183,11 @@ function processOptions(options) {
} else if(!outputOptions) {
outputOptions = {};
}

ifArg("display", function(preset) {
outputOptions = statsPresetToOptions(preset);
});

outputOptions = Object.create(outputOptions);
if(Array.isArray(options) && !outputOptions.children) {
outputOptions.children = options.map(o => o.stats);
@@ -219,40 +226,55 @@ function processOptions(options) {
outputOptions.cachedAssets = false;

ifArg("display-chunks", function(bool) {
outputOptions.modules = !bool;
outputOptions.chunks = bool;
if(bool) {
outputOptions.modules = false;
outputOptions.chunks = true;
outputOptions.chunkModules = true;
}
});

ifArg("display-entrypoints", function(bool) {
outputOptions.entrypoints = bool;
if(bool)
outputOptions.entrypoints = true;
});

ifArg("display-reasons", function(bool) {
outputOptions.reasons = bool;
if(bool)
outputOptions.reasons = true;
});

ifArg("display-depth", function(bool) {
outputOptions.depth = bool;
if(bool)
outputOptions.depth = true;
});

ifArg("display-used-exports", function(bool) {
outputOptions.usedExports = bool;
if(bool)
outputOptions.usedExports = true;
});

ifArg("display-provided-exports", function(bool) {
outputOptions.providedExports = bool;
if(bool)
outputOptions.providedExports = true;
});

ifArg("display-optimization-bailout", function(bool) {
if(bool)
outputOptions.optimizationBailout = bool;
});

ifArg("display-error-details", function(bool) {
outputOptions.errorDetails = bool;
if(bool)
outputOptions.errorDetails = true;
});

ifArg("display-origins", function(bool) {
outputOptions.chunkOrigins = bool;
if(bool)
outputOptions.chunkOrigins = true;
});

ifArg("display-max-modules", function(value) {
outputOptions.maxModules = value;
outputOptions.maxModules = +value;
});

ifArg("display-cached", function(bool) {
@@ -271,22 +293,8 @@ function processOptions(options) {
if(argv["display-modules"]) {
outputOptions.maxModules = Infinity;
outputOptions.exclude = undefined;
}
} else {
if(typeof outputOptions.chunks === "undefined")
outputOptions.chunks = true;
if(typeof outputOptions.entrypoints === "undefined")
outputOptions.entrypoints = true;
if(typeof outputOptions.modules === "undefined")
outputOptions.modules = true;
if(typeof outputOptions.chunkModules === "undefined")
outputOptions.chunkModules = true;
if(typeof outputOptions.reasons === "undefined")
outputOptions.reasons = true;
if(typeof outputOptions.cached === "undefined")
outputOptions.cached = true;
if(typeof outputOptions.cachedAssets === "undefined")
outputOptions.cachedAssets = true;
}
}

ifArg("hide-modules", function(bool) {
@@ -337,7 +345,9 @@ function processOptions(options) {
process.stdout.write(JSON.stringify(stats.toJson(outputOptions), null, 2) + "\n");
} else if(stats.hash !== lastHash) {
lastHash = stats.hash;
process.stdout.write(stats.toString(outputOptions) + "\n");
var statsString = stats.toString(outputOptions);
if(statsString)
process.stdout.write(statsString + "\n");
}
if(!options.watch && stats.hasErrors()) {
process.on("exit", function() {
4 changes: 3 additions & 1 deletion ci/travis-install.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash
set -ev

yarn link || true && yarn link webpack;
yarn link --frozen-lockfile || true && yarn link webpack --frozen-lockfile;

yarn --frozen-lockfile

2 changes: 1 addition & 1 deletion circle.yml
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ machine:

dependencies:
pre:
- case $CIRCLE_NODE_INDEX in 0) NODE_VERSION=4 ;; 1) NODE_VERSION=7 ;; esac; nvm install $NODE_VERSION && nvm alias default $NODE_VERSION
- case $CIRCLE_NODE_INDEX in 0) NODE_VERSION=4 ;; 1) NODE_VERSION=8 ;; esac; nvm install $NODE_VERSION && nvm alias default $NODE_VERSION
override:
- yarn
- yarn link || true && yarn link webpack
18 changes: 9 additions & 9 deletions examples/aggressive-merging/README.md
Original file line number Diff line number Diff line change
@@ -57,13 +57,13 @@ module.exports = {

```
Hash: 75bcce350a8b5f748873
Version: webpack 2.6.0
Version: webpack 3.0.0-rc.0
Asset Size Chunks Chunk Names
0.chunk.js 5.76 kB 0 [emitted]
1.chunk.js 401 bytes 1 [emitted]
pageB.bundle.js 6.58 kB 2 [emitted] pageB
pageA.bundle.js 6.55 kB 3 [emitted] pageA
pageC.bundle.js 6.34 kB 4 [emitted] pageC
1.chunk.js 403 bytes 1 [emitted]
pageB.bundle.js 6.42 kB 2 [emitted] pageB
pageA.bundle.js 6.39 kB 3 [emitted] pageA
pageC.bundle.js 6.18 kB 4 [emitted] pageC
Entrypoint pageA = pageA.bundle.js
Entrypoint pageB = pageB.bundle.js
Entrypoint pageC = pageC.bundle.js
@@ -102,13 +102,13 @@ chunk {4} pageC.bundle.js (pageC) 70 bytes [entry] [rendered]

```
Hash: 75bcce350a8b5f748873
Version: webpack 2.6.0
Version: webpack 3.0.0-rc.0
Asset Size Chunks Chunk Names
0.chunk.js 75 bytes 0 [emitted]
1.chunk.js 78 bytes 1 [emitted]
pageB.bundle.js 1.49 kB 2 [emitted] pageB
pageA.bundle.js 1.49 kB 3 [emitted] pageA
pageC.bundle.js 1.47 kB 4 [emitted] pageC
pageB.bundle.js 1.46 kB 2 [emitted] pageB
pageA.bundle.js 1.46 kB 3 [emitted] pageA
pageC.bundle.js 1.44 kB 4 [emitted] pageC
Entrypoint pageA = pageA.bundle.js
Entrypoint pageB = pageB.bundle.js
Entrypoint pageC = pageC.bundle.js
43 changes: 19 additions & 24 deletions examples/build-common.js
Original file line number Diff line number Diff line change
@@ -10,30 +10,25 @@ var extraArgs = "";

var targetArgs = global.NO_TARGET_ARGS ? "" : " ./example.js js/output.js";
var displayReasons = global.NO_REASONS ? "" : " --display-reasons --display-used-exports --display-provided-exports";
(function doIt(remainingTimes) {
cp.exec("node ../../bin/webpack.js" + displayReasons + " --display-chunks --display-modules --display-origins --display-entrypoints --output-public-path \"js/\" -p " + extraArgs + targetArgs, function (error, stdout, stderr) {
if(stderr && remainingTimes === 1)
cp.exec("node ../../bin/webpack.js" + displayReasons + " --display-chunks --display-max-modules 99999 --display-origins --display-entrypoints --output-public-path \"js/\" -p " + extraArgs + targetArgs, function(error, stdout, stderr) {
if(stderr)
console.log(stderr);
if(error !== null)
console.log(error);
try {
var readme = tc.replaceResults(fs.readFileSync(require("path").join(process.cwd(), "template.md"), "utf-8"), process.cwd(), stdout.replace(/[\r\n]*$/, ""), "min");
} catch(e) {
console.log(stderr);
throw e;
}
cp.exec("node ../../bin/webpack.js" + displayReasons + " --display-chunks --display-max-modules 99999 --display-origins --display-entrypoints --output-public-path \"js/\" --output-pathinfo " + extraArgs + targetArgs, function(error, stdout, stderr) {
console.log(stdout);
if(stderr)
console.log(stderr);
if (error !== null && remainingTimes === 1)
if(error !== null)
console.log(error);
try {
var readme = tc.replaceResults(fs.readFileSync(require("path").join(process.cwd(), "template.md"), "utf-8"), process.cwd(), stdout.replace(/[\r\n]*$/, ""), "min");
} catch(e) {
console.log(stderr);
throw e;
}
cp.exec("node ../../bin/webpack.js" + displayReasons + " --display-chunks --display-modules --display-origins --display-entrypoints --output-public-path \"js/\" --output-pathinfo " + extraArgs + targetArgs, function (error, stdout, stderr) {
if(remainingTimes === 1)
console.log(stdout);
if(stderr && remainingTimes === 1)
console.log(stderr);
if (error !== null && remainingTimes === 1)
console.log(error);
readme = tc.replaceResults(readme, process.cwd(), stdout.replace(/[\r\n]*$/, ""));
readme = tc.replaceBase(readme);
fs.writeFile("README.md", readme, "utf-8", function() {});
if(remainingTimes > 1)
doIt(remainingTimes - 1);
});
readme = tc.replaceResults(readme, process.cwd(), stdout.replace(/[\r\n]*$/, ""));
readme = tc.replaceBase(readme);
fs.writeFile("README.md", readme, "utf-8", function() {});
});
}(3));
});
Loading