Tobias Koppers
812689e580
Merge pull request #4278 from Reduxx/bugfix/spelling-mistake-min-chunk-size-plugin
...
fix spelling error in MinChunkSizePlugin
2017-02-14 11:44:50 +01:00
Tobias Koppers
3a8c32bea6
Merge pull request #4280 from simon04/issue-4270
...
Fix name of contexts created using `import()`
2017-02-14 11:44:27 +01:00
Tobias Koppers
7a39b049ef
Merge pull request #4281 from e-jigsaw/fix-typo
...
fix typo
2017-02-14 11:43:59 +01:00
Tim Sebastian
f418e4d5ae
add tests for newly added methods
2017-02-14 21:28:32 +11:00
Tim Sebastian
f4d8c5f20f
fix inner loop of "remove" method
...
as it is not guaranteed that the the chunk has parents the loop may not be run
this could lead to stale "this" still being a parent of one of its childs.
therefore we have to loop the chunks again.
2017-02-14 21:16:10 +11:00
Tim Sebastian
99d7cb8140
revert changes to `removeAndDo` as it has external deps like ExtractTextPlugin
2017-02-14 21:16:10 +11:00
Tim Sebastian
4438ac9880
remove "removeAndDo" and make usage inline and explicit
2017-02-14 21:16:10 +11:00
Tim Sebastian
9e60f2c302
fixup integratedSize to reflect original functionality
2017-02-14 21:16:10 +11:00
Tim Sebastian
7305593987
rename other to otherChunk
2017-02-14 21:16:10 +11:00
Tim Sebastian
f062f49a70
make clearer what "parents" are
2017-02-14 21:16:10 +11:00
Tim Sebastian
3b4eb0f832
more readable variables
2017-02-14 21:16:09 +11:00
Tim Sebastian
63f0930161
simplify size calculation
...
add "moduleSize" calculator, add multiply and overhead helper
2017-02-14 21:16:09 +11:00
Tim Sebastian
aaee63a500
make variables more readable
2017-02-14 21:16:09 +11:00
Tim Sebastian
dd5eb39dd3
remove unnecessary passing of "this" argument - done via arrow functions
2017-02-14 21:16:09 +11:00
Tim Sebastian
2f58138516
remove unnecessary iteration if b.chunks is not set
2017-02-14 21:16:09 +11:00
Tim Sebastian
9f27e92d42
use replaceChunk and replaceParent in "integrate" method
2017-02-14 21:16:09 +11:00
Tim Sebastian
848b5aeb92
add two helper methods `replaceChunk` and `replaceParent`
...
they take an old item and a new item, remove the old item and add the new one
2017-02-14 21:16:09 +11:00
Tim Sebastian
5fa6caafd6
use method "moveModule" instead of duplicating it when integrating chunk
2017-02-14 21:16:09 +11:00
Tim Sebastian
fc36ac366d
use easier readable variable name in moveModule
2017-02-14 21:16:08 +11:00
Tim Sebastian
779c753baf
transfer add logic for module, block, parent, chunk to prototype
...
bringing the "adder" logic to the prototype might be slighly better performance wise
reuse of logic for add module and block, though they now have one superfluous check (should be negligable though)
2017-02-14 21:16:08 +11:00
Tim Sebastian
071b504a84
merge iteration of parent and sub chunks
...
merge and document iteration over parent and subchunks in remove method
this will slightly increase performance for removing chunks as it only
iterates once over all chunks and parents'
2017-02-14 21:16:08 +11:00
Tim Sebastian
f7e9d5805f
use easier to read variable names
2017-02-14 21:16:08 +11:00
Tim Sebastian
14894f065f
not needed as arrow functions keep "this"
2017-02-14 21:16:08 +11:00
Tim Sebastian
e0da9a8c44
the point of the arrow function is to not need a context passed in
2017-02-14 21:16:08 +11:00
Tim Sebastian
4ea380ff68
no need to add removeAndDo to the context
...
no one else is using it on chunks and `_` indicates its private anyways
2017-02-14 21:16:08 +11:00
Tim Sebastian
3812c101b1
add tests for preventParsing and applyNoParseRule
2017-02-14 21:14:57 +11:00
Tim Sebastian
eb2d6d6d5f
add tests for NormalModule
2017-02-14 20:38:47 +11:00
Mohsen Azimi
43bd355adf
Fix formatting
2017-02-13 18:31:50 -08:00
Mohsen Azimi
776c6c4237
Add more granular schema for stats in options schema
2017-02-13 18:29:58 -08:00
jigsaw
4c6e40f65c
fix typo
2017-02-14 06:28:02 +09:00
Simon Legner
c5b0dffa5f
Fix name of contexts created using `import()`
2017-02-13 21:48:10 +01:00
Simon Sperling
c1346f5aa2
fix spelling error in MinChunkSizePlugin
2017-02-13 16:30:27 +01:00
Tim Sebastian
c71840a6ad
refactor part 2, add comments
2017-02-14 00:16:54 +11:00
Tim Sebastian
fcac9a3fe4
refactor variable cleanup code generation, step one
2017-02-13 23:13:07 +11:00
Tobias Koppers
5a135a7264
updated api for extract-text-webpack-plugin
2017-02-13 12:33:49 +01:00
Tim Sebastian
4d378f51bd
untangle source method
2017-02-13 22:18:15 +11:00
Tim Sebastian
a5d5b9ef55
simplify error handling and simplify markModuleAsErrored as its always called with an error
2017-02-13 21:38:55 +11:00
Tobias Koppers
89bc16c5d3
Merge pull request #4055 from shubheksha/refactor-test-WebEnvironmentPlugin
...
refactor(ES6): WebEnvironmentPlugin.test.js
2017-02-13 09:21:26 +01:00
Tobias Koppers
15377b5a01
Merge pull request #4269 from simon04/import-in-examples
...
Use import() instead of System.import in examples
2017-02-13 09:20:19 +01:00
Simon Legner
e2a883f11a
Regenerate examples
2017-02-13 08:49:35 +01:00
Simon Legner
278a3b00a8
Use import() instead of System.import in examples
2017-02-13 08:49:13 +01:00
Tim Sebastian
b9507cca99
apply review tasks
2017-02-13 00:08:41 +11:00
Tim Sebastian
80e7d4070f
fix typo
2017-02-11 17:07:18 +11:00
Tim Sebastian
7d36c5b7eb
extract asset source creation to own method
2017-02-11 17:07:01 +11:00
Tim Sebastian
1e4d9297b4
split out noParse check for modules
2017-02-11 16:59:58 +11:00
Tim Sebastian
93377f7bc4
refactor needRebuild to make use of early return if possible
2017-02-11 16:10:07 +11:00
Tim Sebastian
128e04365b
use const for source, as let is no longer necessary
2017-02-11 15:59:35 +11:00
Tim Sebastian
2a66bb47cd
use arrow function to bind `this` and remove indirection over local "module" variable
2017-02-11 15:59:08 +11:00
Tim Sebastian
d4c48531f1
extract source creation to its own method
2017-02-11 15:57:52 +11:00
Tim Sebastian
a766b66b91
extract loadercontext creation to its own method
2017-02-11 15:32:48 +11:00