Commit Graph

260 Commits

Author SHA1 Message Date
Tobias Koppers d6cf42e4c2 merge used with usedExports
usedExports = false now means module is not used
2018-08-06 21:05:11 +02:00
Tobias Koppers c4e0a9f72e Move Module.used and Module.usedExports into ModuleGraph 2018-08-06 21:04:01 +02:00
Tobias Koppers 97cc9d7140 Move optimizationBailout into ModuleGraph meta information 2018-08-06 10:42:41 +02:00
Tobias Koppers 381e2db200 replace Module.reasons and Dependency.module with ModuleGraph 2018-08-02 17:54:44 +02:00
Tobias Koppers 11e127d162 pass moduleGraph along with multiple methods 2018-08-02 17:54:42 +02:00
Tobias Koppers f89b599197 add types to Stats
move recorded property into a WeakMap
remove non-existing property
2018-08-02 16:07:29 +02:00
Tobias Koppers cf5f1d723c format existing code 2018-07-30 21:29:21 +02:00
Florent Cailhol dad4a4c539 Convert SizeFormatHelpers 2018-07-26 22:37:21 +02:00
Tobias Koppers 66d3f319a6 Merge tag 'v4.16.2' into next
4.16.2
2018-07-23 12:19:16 +02:00
Tobias Koppers dcd644253f
remove comment 2018-07-20 09:28:48 +02:00
Tobias Koppers e80d49445c fix sorting of reasons 2018-07-19 19:44:44 +02:00
Florent Cailhol ee64e6dcfc Default 'source' to 'false' for stats 2018-07-14 21:28:26 +02:00
Tobias Koppers 692faf2e45 sort ids in Stats numerical 2018-07-10 11:32:45 +02:00
Tobias Koppers ad8f496745 arrow functions, remove or improve eslint-disable comments 2018-06-27 13:48:13 +02:00
Tobias Koppers 53103a9690 Cleanup error location and origin information 2018-06-04 10:35:46 +02:00
Florent Cailhol 2a9452e51b Add brackets for multiline if/for statements 2018-05-29 15:45:44 +02:00
Tobias Koppers 351c9936e6 fixup reasons when redirecting dependencies for side-effects
show reason explanation in stats

fixes #7428
2018-05-29 14:12:31 +02:00
Tobias Koppers ec83e8ea9b
Merge pull request #7129 from webpack/deps/in-range
Upgrade dependencies in range
2018-04-27 07:45:33 +02:00
Tobias Koppers d91caea860 Pretty files for updated prettier version 2018-04-26 20:14:45 +02:00
SlavaB 71a12c8bc1 Add tests for namedChunkGroups 2018-04-24 19:01:02 +03:00
SlavaB 9ea19997c8 Rename stats chunk groups property 2018-04-22 14:57:45 +03:00
SlavaB a95f4144fa Add assets by chunk groups to stats JSON 2018-04-21 14:20:23 +03:00
Tobias Koppers 873d7d442a show preload and prefetch in stats 2018-04-17 08:56:40 +02:00
Tobias Koppers 17eb5b4700 rename priority to order 2018-04-16 18:00:34 +02:00
Tobias Koppers 9cb1a66317 add support for link preload/prefetch
`import(/* webpackPrefetchPriority: 10 */ "...")`
`import(/* webpackPreloadPriority: 10 */ "...")`
2018-04-16 11:29:25 +02:00
Tobias Koppers 0b1e9d8e09
Merge pull request #6982 from mohsen1/json-and-date-api-fixes
JSON and Date API usage fixes
2018-04-11 16:42:15 +02:00
Florent Cailhol 37ff424dd9
Pass undefined as locale 2018-04-10 21:32:12 +02:00
Florent Cailhol a9a3361027 Change stats wording when all exports are used 2018-04-10 09:13:58 +02:00
Mohsen Azimi 068ad7f2e5
pretty 2018-04-07 18:19:31 -07:00
Mohsen Azimi 839892c8a2
JSON and Date API usage fixes 2018-04-07 18:17:23 -07:00
Tobias Koppers c1a3676a80
Merge pull request #6944 from webpack/feature/stats-string-output
align stats string output to max length
2018-04-04 18:50:07 +02:00
Tobias Koppers 27d76683a3 align stats string output to max length 2018-04-04 14:40:34 +02:00
Tobias Koppers 45e7f7a2cb
Merge pull request #6878 from rchaser53/fix-options-loader-error
emit correct path when using loader in options
2018-04-04 14:33:43 +02:00
rchaser53 65aa1c0928 format the file path in the error message 2018-03-29 20:58:38 +09:00
Mohsen Azimi 6fa6720abc
Intialize start and end time as undefined in Stats 2018-03-28 21:49:00 -07:00
byzyk 0f65643a42 fix: wrap bool with function to pass tests 2018-03-14 11:12:01 +04:00
byzyk 13b80be3ba fix: make excludeModules accept booleans 2018-03-14 09:52:16 +04:00
Tobias Koppers edbb6f64bd
Merge pull request #6670 from SimenB/patch-1
Use 2-digit format for day and month in "built at" output
2018-03-06 15:10:39 +01:00
Clark Du 23208a311c
Show plural if assets are more than one 2018-03-05 17:12:40 +08:00
Simen Bekkhus bb2320cf13
Update Stats.js 2018-03-05 08:41:07 +01:00
Clark Du 81235e1331 Add stats.moduleAssets to show assets inside modules in the Stats 2018-03-04 13:39:05 +08:00
Clark Du b8155970db
fix: module assets is in buildInfo 2018-03-02 02:17:46 +08:00
Josh Soref ecc7fd2fe5 spelling: suppressed 2018-02-26 02:49:06 +00:00
Tobias Koppers f32bd41c52 fix linting 2018-02-25 02:15:37 +01:00
Tobias Koppers 5238159d21 run prettier on existing code 2018-02-25 02:00:20 +01:00
Tobias Koppers 7d2a4e5af5 sort parents, children, siblings in stats 2018-02-17 09:50:56 +01:00
Tobias Koppers 97d1a7bd06
Merge pull request #6404 from Hoten/feat-add-build-at
Add 'build at' time to webpack output
2018-02-01 17:32:37 +01:00
Francis John 02fabaf41c Update Stats.js 2018-01-31 20:17:31 -08:00
Francis John 3e0baf8303 Expose output path in Stats object
https://github.com/webpack/webpack/issues/6373
2018-01-31 20:17:30 -08:00
Connor Clark 5266a30808 add builtAt stats option. use locale string functions 2018-01-30 17:34:08 -08:00
Leon Weidauer 152575c2b0 Fix Stats and BinTestCases after adding "Built at"
In order to pass the tests, a similar
test replacement as with the millisecond values
needs to happen.

For the "Built at" stat all dates are replaces with
Thu Jan 01 1970 00:00:00 GMT.

Related to issue #5305

add semicolon
2018-01-29 19:51:49 -08:00
Kunall Banerjee 5cc55d8912 Add built at time to webpack output 2018-01-29 15:00:14 -08:00
Connor Clark 7de55c8e8c Use builtAt time instead of current time for stats logging 2018-01-29 14:59:49 -08:00
Connor Clark 56d22e9917 Use builtAt time instead of current time for stats logging 2018-01-29 14:59:13 -08:00
Leon Weidauer 09f959c684 Fix Stats and BinTestCases after adding "Built at"
In order to pass the tests, a similar
test replacement as with the millisecond values
needs to happen.

For the "Built at" stat all dates are replaces with
Thu Jan 01 1970 00:00:00 GMT.

Related to issue #5305
2018-01-29 14:59:13 -08:00
Kunall Banerjee 795a8ed4b2 Add built at time to webpack output 2018-01-29 14:59:13 -08:00
Tobias Koppers 7a1b357aad
Merge branch 'next' into for_of_loops 2018-01-24 09:01:31 +01:00
Florent Cailhol d4811b0d37 Use for-of loops instead of forEach 2018-01-23 22:53:18 +01:00
Florent Cailhol 77bb4c0055 Deprecate forEach* and map* methods 2018-01-23 22:19:59 +01:00
Tobias Koppers ea609374f7 split Chunk.isInitial into isOnlyInitial and canBeInitial
remove includeInitial argument of getChunk(Module)Maps
2018-01-22 12:52:28 +01:00
Tobias Koppers 18ae73dad4 Refactor chunk graph
Chunks are now always in ChunkGroups
ChunkGroups have parents and children, Chunks no longer have this
AsyncDependenciesBlocks point to a ChunkGroup instead of a list of chunks
Entrypoint is now a ChunkGroup (extends from it)
move stuff graph modification methods into GraphHelpers
Change chunk id recording to source-based
Chunks have parents, siblings and children in Stats
rename AutomaticCommonsChunksPlugin to SplitChunksPlugin
add request property to origin (ChunkGroup)
remove moveToParent from AggressiveMergingPlugin
fix issues with AggressiveSplittingPlugin
remove CommonsChunkPlugin
add optimization.runtimeChunk (RuntimeChunkPlugin)
fix a filename bug for initial chunks
remove extract-text-webpack-plugin from test suite
add DebugHash to help debugging hash issues
fix issues with entry modules in different chunk as runtime
redo optimization.splitChunks options
Compilation.entrypoints is now a Map
Compilation.chunkGroups has been added
remove some unittests
update examples
update tests with CommonsChunkPlugin
2018-01-19 19:21:30 +01:00
Tobias Koppers 7112943ca4
Merge pull request #6298 from EugeneHlushko/refactor/indexof-to-includes
Refactor/indexof to includes
2018-01-11 22:45:02 +01:00
EugeneHlushko 2aab060f26 Refactor: indexOf >< checks to includes 2018-01-11 18:58:39 +02:00
Tobias Koppers b34663cb2d add more config options
fix bugs
2018-01-10 18:58:27 +01:00
Tobias Koppers bf898c08c4 show entrypoints by default 2018-01-09 22:55:36 +01:00
Tobias Koppers 45f8a28b44 Merge branch 'master' into next
# Conflicts:
#	lib/JsonpMainTemplatePlugin.js
#	lib/NoEmitOnErrorsPlugin.js
2018-01-04 20:59:34 +01:00
Mike Greiling a9c0bfdb1b ensure hasErrors() and hasWarnings() check child compilations as well 2017-12-22 00:10:47 -06:00
Tobias Koppers ba00d7495a fix unnecessary module concatenation
allow to display nested modules in stats
2017-12-20 20:35:16 +01:00
Tobias Koppers 2378bfea6c fix Stats output for no exports 2017-12-14 10:57:33 +01:00
Tobias Koppers c68f224272 move providedExports into buildMeta 2017-12-12 17:01:03 +01:00
Tobias Koppers ffb977fed4 refactor meta -> buildMeta, add factoryMeta
add compat layer to Module.meta
2017-12-12 16:57:50 +01:00
Tobias Koppers 7d87f34269 Only create one RequestShortener per Compiler
move Compiler.context assignment into Compiler
2017-12-04 12:23:42 +01:00
Tobias Koppers d249016aba Don't emit duplicate module names in stats 2017-11-24 08:03:22 +01:00
Tobias Koppers f7c2f8e470 Update code style to arrow functions 2017-11-08 11:56:01 +01:00
Tobias Koppers 0339d4da49 Refactor weird things
* Declare used properties in constructor
* Module.(re)building moved into Compilation._(re)buildingModules (Map)
* Make NormalModule.error private
* Move Module.cacheable logic into needRebuild
* More stable implemention of rebuildModule
* addModuleChain waits for Module building finished before returning
* Set built and cacheable flags correctly in Modules
* More portableId into WeakMap
* Add ModuleReason for entrypoints
* cacheable can be true/false/null in Stats
* added Stats module issuerPath
* fixes profile in stats output
2017-11-06 13:16:09 +01:00
Tobias Koppers 82f42e2c67 Merge branch 'master' into next 2017-10-17 12:38:38 +02:00
Tobias Koppers b597322e3c fix behavior and add a warning when trying to load an
initial chunk on demand
2017-10-17 09:06:05 +02:00
Tobias Koppers 814c894168 Merge branch 'master' into next
# Conflicts:
#	lib/optimize/CommonsChunkPlugin.js
#	test/statsCases/limit-chunk-count-plugin/expected.txt
#	test/statsCases/named-chunks-plugin-async/expected.txt
#	test/statsCases/optimize-chunks/expected.txt
2017-10-16 10:47:17 +02:00
Joe Bottigliero 33223aa3d4 [#4886] --env output
- Adds stats.env to enable the out put of --env arguments passed to the webpack configuration.
2017-10-11 20:37:30 -05:00
Tobias Koppers b316bee0a6 Use SortableSets for Chunk.parents/blocks 2017-09-22 16:38:47 +02:00
Tobias Koppers 7fe03718f2 display better message, instead of empty list 2017-08-02 23:45:02 +02:00
Ricky Lippmann 05f7b2d5b7 Add excludeModules and allow multiple options as fallbackchain. 2017-07-27 18:33:10 +02:00
Ricky Lippmann d1b3b4f8b9 Moved hidden assets message out of the assets table. 2017-07-27 10:11:58 +02:00
Ricky Lippmann a3d556782d Add notification for hidden assets. 2017-07-26 16:03:06 +02:00
Ricky Lippmann c9cbaf04e7 Fix linting issues 2017-07-26 14:22:47 +02:00
Ricky Lippmann 82217992b7 Add new option "excludeAssets" to Stats 2017-07-26 11:46:31 +02:00
Tobias Koppers 838d416874 Merge branch 'master' into deps/extract-text-webpack-plugin 2017-07-24 14:16:05 +02:00
Tobias Koppers 7d5916c50e make child names relative 2017-07-24 13:28:33 +02:00
Tobias Koppers 991b360c90 fix useless-escape linting issues 2017-07-24 11:54:06 +02:00
Tobias Koppers b9adfaaf76 rewrite code which uses unshift to push 2017-07-18 20:46:59 +02:00
Tobias Koppers d6a7594d38 harmony modules without exports have no exports instead of unknown 2017-06-14 22:46:10 +02:00
Tobias Koppers 6058483d74 default chunk modules in Stats to true 2017-06-09 15:05:38 +02:00
Tobias Koppers 0f16dd95b1 fixes incorrect CLI stats output
add "detailed" preset
clean up presets to do more useful stuff

fixes #4141
fixes #4118
2017-06-01 15:03:26 +02:00
Tobias Koppers 8b81788a73 fixes for stats 2017-05-28 19:20:17 +02:00
Tobias Koppers d8539561fd add optimization bailout info
track optimization bailout in concat plugin
2017-05-28 15:25:07 +02:00
Tobias Koppers 2bd2d2844c improve a few issues
from review by @Kovensky
2017-05-20 14:54:42 +02:00
Tobias Koppers 8d3efe7d63 Merge branch 'next' into perf/modules-set 2017-05-16 14:37:03 +02:00
Tobias Koppers e1bac32c19 Use a Set to store modules in a chunk 2017-05-16 11:50:50 +02:00
Even Alander 41310135bb rename stats.stackTrace to stats.moduleTrace 2017-04-28 09:20:14 +02:00
Even Alander 7e4310a175 add option to lib/Stats.js to disable stack trace on errors and warnings 2017-04-27 10:22:20 +02:00