Commit Graph

65 Commits

Author SHA1 Message Date
Tobias Koppers 12436bf53e add chunkRelations to stats config 2018-12-23 10:04:23 +01:00
Tobias Koppers 8281667668 improve ids for Long Term Caching
add deterministic chunk ids and make it default
StatsTestCases no longer need to explicitly use natural ids as the defaults are deterministic now too
add concept of id name hints for chunks
add `idHint` option to splitChunks to provide a hint
deduplicated code from different id plugins to IdHelpers
improve behavior of named ids in case of conflicts
remove `name: true` and `automaticNamePrefix` from splitChunks it's not as good as expected
improve named chunk ids to show root modules
2018-12-07 12:26:35 +01:00
Tobias Koppers f63c9b8e43 Use natural ids in most stats cases to make them more stable 2018-07-27 12:28:02 +02:00
Tobias Koppers 2d279fcfbe Use jest snapshot testing 2018-05-01 16:09:50 +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 27d76683a3 align stats string output to max length 2018-04-04 14:40:34 +02:00
Florent Cailhol 40ee8c76d2 Use MD4 for hashing 2018-02-22 11:27:11 +01:00
Tobias Koppers 7d2a4e5af5 sort parents, children, siblings in stats 2018-02-17 09:50:56 +01: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
Michael Ciniawsky 390fac43b4 fix(lib/Chunk): typo in `getNumberOfGroups` return value 2018-01-23 08:54:19 +01:00
Tobias Koppers a2eada1d33 Merge branch 'master' into next
# Conflicts:
#	lib/BannerPlugin.js
2018-01-22 08:48:30 +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 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
Tobias Koppers d95f93f8cb add output.globalObject configuration option
remove deprecated atom and electron target
add self libraryTarget
add self external type
2017-12-27 18:46:37 +01:00
Tobias Koppers fea0c57423 readd missing space 2017-12-23 08:11:28 +01:00
Tobias Koppers 2aac6badd5 move generated runtime code to RuntimeTemplate 2017-12-22 19:41:28 +01:00
Tobias Koppers 2a1546d355 fix reversed order in OccurenceOrderPlugin
try to keep original order
fallback order by name if index order fails
2017-12-20 20:35:16 +01:00
Tobias Koppers 91e6692362 extract exports from wasm module
mangle used exports
fix esm flag
2017-12-14 13:05:03 +01:00
Tobias Koppers c68f224272 move providedExports into buildMeta 2017-12-12 17:01:03 +01:00
Tobias Koppers 2201b860a5 Add mode option and choose defaults depending on mode
add optimization options
use development mode for watch/hot/config tests
use production mode for integration/stats tests
create output directory if not existing
move __esModule to runtime
fix dependency behavior for cases without usedExports
2017-11-24 08:17:17 +01:00
Tobias Koppers ae2919d28a update stats cases for smaller bundles 2017-11-21 12:59:14 +01:00
Tobias Koppers dbc02deed7 Merge branch 'next' into 5769_file_size_in_kibibytes
# Conflicts:
#	test/statsCases/aggressive-splitting-entry/expected.txt
#	test/statsCases/aggressive-splitting-on-demand/expected.txt
#	test/statsCases/chunks/expected.txt
#	test/statsCases/color-disabled/expected.txt
#	test/statsCases/color-enabled-custom/expected.txt
#	test/statsCases/color-enabled/expected.txt
#	test/statsCases/commons-chunk-min-size-0/expected.txt
#	test/statsCases/commons-chunk-min-size-Infinity/expected.txt
#	test/statsCases/commons-plugin-issue-4980/expected.txt
#	test/statsCases/define-plugin/expected.txt
#	test/statsCases/exclude-with-loader/expected.txt
#	test/statsCases/external/expected.txt
#	test/statsCases/filter-warnings/expected.txt
#	test/statsCases/import-weak/expected.txt
#	test/statsCases/limit-chunk-count-plugin/expected.txt
#	test/statsCases/max-modules-default/expected.txt
#	test/statsCases/max-modules/expected.txt
#	test/statsCases/module-trace-disabled-in-error/expected.txt
#	test/statsCases/module-trace-enabled-in-error/expected.txt
#	test/statsCases/named-chunks-plugin-async/expected.txt
#	test/statsCases/named-chunks-plugin/expected.txt
#	test/statsCases/optimize-chunks/expected.txt
#	test/statsCases/performance-disabled/expected.txt
#	test/statsCases/performance-error/expected.txt
#	test/statsCases/performance-no-async-chunks-shown/expected.txt
#	test/statsCases/performance-no-hints/expected.txt
#	test/statsCases/preset-detailed/expected.txt
#	test/statsCases/preset-normal-performance-ensure-filter-sourcemaps/expected.txt
#	test/statsCases/preset-normal-performance/expected.txt
#	test/statsCases/preset-normal/expected.txt
#	test/statsCases/preset-verbose/expected.txt
#	test/statsCases/resolve-plugin-context/expected.txt
#	test/statsCases/reverse-sort-modules/expected.txt
#	test/statsCases/separate-css-bundle/expected.txt
#	test/statsCases/simple-more-info/expected.txt
#	test/statsCases/simple/expected.txt
#	test/statsCases/tree-shaking/expected.txt
#	test/statsCases/warnings-uglifyjs/expected.txt
2017-11-20 13:19:57 +01:00
Tobias Koppers 00f2b5ede7 advanced module type refactoring
added json type
.mjs default to javascript/esm type
adjusted parser plugins to react on module type
2017-11-11 19:27:19 +01:00
Tobias Koppers 65e855c636 fix deprecations 2017-11-11 11:27:02 +01:00
Tobias Koppers c34d627fb7 update stats for changed sizes 2017-11-10 11:55:01 +01: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
Tobias Koppers 45756a2291 set chunk reasons symmetrical 2017-10-13 10:44:08 +02:00
Tobias Koppers 5abd69680d Merge branch 'master' into next
# Conflicts:
#	lib/Compilation.js
#	test/statsCases/optimize-chunks/expected.txt
2017-10-11 19:26:00 +02:00
Tobias Koppers 7870bfc01d improve chunk graph building performance
document algorithm
2017-10-11 15:08:00 +02:00
Robo Burned 4cc3832926 Update tests to match file size in kibibytes. 2017-10-09 14:20:53 +04:00
Mathias Bynens 61bc4eee09 Remove redundant `.type="text/javascript"` and `.async=true` 2017-09-22 14:45:46 +02:00
Tobias Koppers 553287d67d Merge branch 'next' into feature/jsonp-error
# Conflicts:
#	test/statsCases/aggressive-splitting-on-demand/expected.txt
#	test/statsCases/chunks/expected.txt
#	test/statsCases/commons-chunk-min-size-0/expected.txt
#	test/statsCases/commons-plugin-issue-4980/expected.txt
#	test/statsCases/import-weak/expected.txt
#	test/statsCases/limit-chunk-count-plugin/expected.txt
#	test/statsCases/named-chunks-plugin-async/expected.txt
#	test/statsCases/named-chunks-plugin/expected.txt
#	test/statsCases/optimize-chunks/expected.txt
#	test/statsCases/preset-detailed/expected.txt
#	test/statsCases/preset-normal-performance-ensure-filter-sourcemaps/expected.txt
#	test/statsCases/preset-normal/expected.txt
#	test/statsCases/preset-verbose/expected.txt
2017-09-15 10:30:33 +02:00
Tobias Koppers 9bcc0d58cb code cleanup and existence checks 2017-09-14 15:10:29 +02:00
Tobias Koppers 7387c50c3a change jsonp function to jsonp array push 2017-09-14 08:49:14 +02:00
mc-zone baada552e2 add error type and request url when dynamic chunk failed to load (#4595) 2017-08-23 16:20:27 +08:00
Tobias Koppers 890a507b08 optimize OccurenceOrderPlugin 2017-06-02 01:24:55 +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 d967a4623c add `module.strictThisContextOnImports` option
to allow spec-comforming behavior this context on
called imported harmony functions
2017-05-21 09:23:35 +02:00
Tobias Koppers 22e7d254ee Add webpackMode optios for import()
Allow lazy, lazy-once and eager mode for import()
Fix a bug which caused context chunks to be merged when using chunk name
Allow to work in env where there is no Promise.resolve
2017-05-05 09:03:24 +02:00
Tobias Koppers 79833b4938 updated stats 2017-04-09 10:41:32 +02:00
Stefan Schneider 99de6d9ec1 Updated Stats 2017-04-03 08:41:44 +02:00
Tobias Koppers 23e1f7c8c9 install Promise early in chunk cache
IE executes script very early when cached

fixes #4472
2017-03-21 16:08:45 +01:00
Tobias Koppers 02e19b5ad4 update snapshots and fix test
PrefixSource now include empty lines which cases bigger runtime size (only comments)
cheap source map excludes mappings for empty files
2017-03-15 14:37:10 +01:00
Tobias Koppers 089356faa3 fixes a bug in OccurrenceOrderPlugin 2017-01-30 22:49:53 +01:00
Tobias Koppers 8e69a80847 code linting 2017-01-11 12:29:01 +01:00
Tobias Koppers 9380bd4c12 Bugfix/disable module in harmony (#3755)
* moved format location into separate file
allow dependencies to report errors too

* NullDependencies do not change the hash

* dependencies can opt-out from `__webpack_require__` param

* apply module syntax plugins earlier

* emit errors if using AMD or CommonJS syntax in harmony modules
2017-01-09 10:11:34 -06:00
Sean Larkin c7b06ad617 feat(moduletemplate): Wrap function module template wrappers with parens (#3658)
* feat(moduletemplate): Wrap function module template wrappers with parens.

* update stats
2016-12-31 10:08:40 -06:00
Tobias Koppers 3fcd2019da full require.ensure comment 2016-12-23 09:24:21 +01:00
Roman Vyakhirev 48c3c8585c Update stats tests 2016-12-22 13:27:17 +01:00