Commit Graph

469 Commits

Author SHA1 Message Date
Steven Hargrove 21af6191ab report existing errors before async queue stop error 2019-01-11 19:14:49 -05:00
Tobias Koppers e4d1a45c8d Use FileSystemInfo.createSnapshot for NormalModules too 2019-01-09 14:42:57 +01:00
Tobias Koppers 90baf475af Smaller performance improvements in NormalModuleFactory 2019-01-08 15:14:33 +01:00
Tobias Koppers ef9e25d8ea report dependencies from resolver to the compilation
refactor NormalModuleFactory
2019-01-08 15:14:25 +01:00
Tobias Koppers b5db48291b add caching to FlagDependencyExportsPlugin 2018-12-31 12:29:01 +01:00
Tobias Koppers 1374757006 remove ModuleReason
remove HotUpdateChunkTemplate
move compareLocations into comparators
re-enable NodeSourcePlugin for `.mjs`
2018-12-20 16:38:26 +01:00
Tobias Koppers 123b0a64e7 add plugin system for Stats presets, defaults, creation and printing 2018-12-18 22:07:14 +01:00
Florent Cailhol e06b4853d6 Add compiler typings 2018-12-12 10:26:53 +01:00
Tobias Koppers 49f79cb702 add types to new hooks 2018-11-30 12:21:57 +01:00
Tobias Koppers 8066eaf299 put runtime modules into separate place in chunks
don't include them in modules array/object
better stats output for runtime moduels
2018-11-29 16:23:31 +01:00
Tobias Koppers 9d91861592 Refactor HMR for runtime modules
fixed a few HMR bugs
allow other module types for HMR
made HMR more flexible
2018-11-29 16:22:29 +01:00
Tobias Koppers f7f8e0ff0f fixes for SourceMap handling 2018-11-29 16:17:37 +01:00
Tobias Koppers f753f92c28 ensureChunk to RuntimeModule
step 1: non HMR cases
2018-11-29 16:16:39 +01:00
Tobias Koppers 3292879380 generate runtime module hash later to allow to include chunk hashes 2018-11-29 16:13:56 +01:00
Tobias Koppers 7c37a6a972 handle runtime requirements 2018-11-29 16:07:17 +01:00
Tobias Koppers 2525c8b7aa move runtime requirements storage into ChunkGraph
use info for function generation
for noParse default to module and exports requirements
2018-11-29 16:06:44 +01:00
Tobias Koppers c1e89c0543 Runtime requirement support in NormalModule, Generators and DependencyTemplate 2018-11-29 16:06:12 +01:00
Tobias Koppers 0232674f9c Initial runtime module work 2018-11-29 16:03:32 +01:00
Tobias Koppers 9410954ed1
change TODO to webpack 6 2018-11-14 13:14:05 +01:00
Tobias Koppers c89c9a7dc5 add backwards-compat hook for normalModuleLoader 2018-11-13 17:55:42 +01:00
Florent Cailhol 3766869c48 Move normalModuleLoader hook 2018-11-12 14:26:32 +01:00
Florent Cailhol 9ffb4e45dc Replace Source#emitted by a WeakSet 2018-11-08 23:26:31 +01:00
Florent Cailhol de41d1fe8b Add missing types on Chunk related classes 2018-11-07 14:10:57 +01:00
Tobias Koppers 8cf1cdb74f Merge tag 'v4.25.0' into next
4.25.0
2018-11-05 10:27:45 +01:00
Tobias Koppers 64e3826067 use flags to show different parts of the progress message
refactor activeModules to Set for performance reasons
2018-11-04 10:33:14 +01:00
Tobias Koppers e7ec244415 do not mutate data 2018-11-01 20:23:10 +01:00
Sergey Melyukov aa8cb0fab7 ProgressPlugin: refactoring 2018-10-29 15:49:31 +03:00
Tobias Koppers c27b46ac8b fix duplicate errors and warnings 2018-10-25 10:52:31 +02:00
Tobias Koppers 071062422e Merge tag 'v4.22.0' into next
4.22.0
2018-10-23 16:41:31 +02:00
Tobias Koppers 94eb554dc0 fix byId sorting 2018-10-23 11:32:39 +02:00
Tobias Koppers 5165a90de8
Merge pull request #8242 from webpack/perf/chunk-graph
Optimize chunk graph algorithm
2018-10-20 06:09:58 +02:00
Tobias Koppers 5e4a6a4f5d fix byId sorting 2018-10-19 13:20:48 +02:00
Tobias Koppers 98b482efd7 make dependency order stable 2018-10-19 12:57:24 +02:00
Tobias Koppers 65d9ffb91e Optimize chunk graph algorithm 2018-10-19 10:37:43 +02:00
Tobias Koppers bbedceaa16 add error class for restore errors 2018-10-17 22:54:07 +02:00
Tobias Koppers a852828279 add persistent caching prototype 2018-10-17 21:25:39 +02:00
Tobias Koppers 518104b3fb Merge tag 'v4.21.0' into next
4.21.0
2018-10-17 20:38:00 +02:00
Tobias Koppers 0e232a926c
Merge pull request #8170 from webpack/refactor/cache2
refactor cache to be more generic and usable for other things
2018-10-17 10:47:06 +02:00
Florent Cailhol d311847a05 Remove Compilation#performance 2018-10-12 17:57:10 +02:00
Tobias Koppers 9b8d26f6e8 refactor cache to be more generic and usable for other things 2018-10-11 10:46:48 +02:00
Michael Loughry 👨‍💻 1d71ede475 Make changes suggested by @sokra to optimize chunk graph generation 2018-10-04 16:10:12 -07:00
Tobias Koppers ae72fe3724 fixes timestamp transfer from watcher 2018-09-27 21:28:07 +02:00
Tobias Koppers 7340fbb547 refactor Cache
add a new hookable Cache class
removed CachePlugin
add MemoryCachePlugin
refactor timestamps
create FileSystemInfo class
2018-09-27 13:20:19 +02:00
Tobias Koppers f31a8c231b add compilerPath (will be later used to access the cache) 2018-09-27 11:21:17 +02:00
Tobias Koppers 46232fab31 make Compilation.addModule async and queued 2018-09-27 11:21:11 +02:00
Tobias Koppers 52634e7a2d remove cacheGroup argument from addModule 2018-09-27 11:21:06 +02:00
Tobias Koppers 4eab41bd5f refactor Module.needBuild to be async 2018-09-27 11:20:54 +02:00
Tobias Koppers 554b417546 Modules are responsible for sorting of dependencies 2018-09-27 11:20:42 +02:00
Tobias Koppers 17044bf9c6 Merge tag 'v4.20.0' into next
4.20.0
2018-09-25 16:20:42 +02:00
Chuck Dumont f8877e0819 Uncaught exception from renderers 2018-09-21 14:42:25 -04:00
Tobias Koppers d48975c948 use types from schema 2018-09-21 11:04:19 +02:00
Tobias Koppers 97ed999aad Merge tag 'v4.19.0' into next
4.19.0

* Separate context for renderBoostrap and hooks
* Remove ModuleTemplate from MainTemplate.bootstrap hook
2018-09-15 13:10:58 +02:00
Tobias Koppers 13b2cdd5ae hash content of bootstrap code
instead of trying to calculate it
from inputs

fixes #8027
fixes #7984
2018-09-13 23:25:26 +02:00
Tobias Koppers 5b4cbb5ee0 add queues to Compilation
remove Semaphore and use AsyncQueue instead
deprecate Module.needRebuild, add Module.needBuild
remove Module.unbuild
add Module.invalidateBuild
2018-09-12 13:17:03 +02:00
Tobias Koppers d48a331642 Split Compilation process in multiple methods 2018-09-12 13:17:02 +02:00
Tobias Koppers b098789625 remove recursive flag 2018-09-12 13:17:00 +02:00
Tobias Koppers 3c244d9fc9 Optimize error origin handling and module trace
Improve warnings and errors sorting
2018-09-12 13:16:59 +02:00
Tobias Koppers 7a43a27eda make Compilation.chunks a Set 2018-09-06 17:04:01 +02:00
Tobias Koppers 6ca7ae1c48 make Compilation.modules a Set 2018-09-06 17:03:24 +02:00
Tobias Koppers b4860ccebb refactor chunk id plugins 2018-09-05 14:28:52 +02:00
Tobias Koppers 4a7a85ca84 rename index/index2 to pre/postOrderIndex 2018-09-04 09:27:25 +02:00
Tobias Koppers 4d7b5b3b5e Refactor module id plugins to be independent 2018-09-03 20:45:44 +02:00
Florent Cailhol 8fda6a562e Add NaturalModuleIdsPlugin 2018-09-03 20:12:55 +02:00
Tobias Koppers bad9d8a271 move Module.id into ChunkGraph
remove disconnect and unseal from Module
2018-08-28 15:08:52 +02:00
Tobias Koppers 02b15a1b46 pass chunkGraph to updateHash instead of moduleGraph
pass chunkGraph to compareModulesById instead of moduleGraph
pass chunkGraph to methods of RuntimeTemplate
use comparators from module at some places
2018-08-28 12:06:53 +02:00
Tobias Koppers 239ce7fcd9 Use ChunkGraph instead of Compilation in updateHash 2018-08-24 12:02:42 +02:00
Tobias Koppers 670502fc81 Move AsyncDependenciesBlock.chunkGroup into ChunkGraph 2018-08-22 20:17:49 +02:00
Tobias Koppers 3aa2280498 move Module.hash and .renderedHash into ChunkGraph 2018-08-22 19:24:54 +02:00
Tobias Koppers eb63cf80d6 move built flag into Compilation 2018-08-22 15:33:16 +02:00
Tobias Koppers e0f84652c0 remove Module.prefetched
remove prefeteched from Stats
make Compilation.addModuleChain public and remove onModule argument
remove Compilation.prefetch
2018-08-22 15:19:05 +02:00
Tobias Koppers b20556c1ff move profile to ModuleGraph 2018-08-22 14:54:28 +02:00
Tobias Koppers 26022c86a0 move Module.depth into ModuleGraph
nested modules no longer have depth and stay unsorted in stats
2018-08-22 12:45:11 +02:00
Tobias Koppers 5a78e96dc9 add backward-compat layer for ModuleGraph and ChunkGraph 2018-08-21 16:17:02 +02:00
Tobias Koppers 42167db4af move Module.index and index2 into ModuleGraph 2018-08-21 16:16:51 +02:00
Tobias Koppers 4dfe88edb0 add moduleGraph argument to comparators 2018-08-21 11:08:07 +02:00
Tobias Koppers 3bb5263bfd move methods from Module into ModuleGraph 2018-08-21 11:04:40 +02:00
Florent Cailhol 7b02084bc5 Replace Basic and Advanced optimzation hooks by stages 2018-08-16 14:10:51 +02:00
Tobias Koppers 6d5310fbd6 allow multiple entryModules per chunk
allow to specify ChunkGroup to depend on
move entry modules into ChunkGraph
2018-08-15 11:51:16 +02:00
Tobias Koppers 3cf01999b5 add ChunkGraph
move chunk modules and module chunks into the ChunkGraph
remove outdated unit tests
2018-08-14 15:32:13 +02:00
Tobias Koppers d35e42a14d move Module.issuer into Module.getIssuer(moduleGraph) 2018-08-09 16:44:28 +02:00
Tobias Koppers 3618cc1b3c remove originModule from Dependencies and add parent module to ModuleGraph 2018-08-07 14:20:53 +02:00
Tobias Koppers 565b569b68 Merge tag 'v4.16.5' into next
4.16.5
2018-08-06 09:20:57 +02:00
Tobias Koppers 17ebfb9784 fix #7829
webpack-hot-client seem to call `addEntry` multiple
which causes two Entrypoints with the same name
This lead the bad side effects
i. e. optimization.runtimeChunk no longer works correctly

Now adding an entry with the same name replaces the existing entry
2018-08-03 11:09:26 +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 f68c1f7ab6 add additional arguments to updateHash 2018-08-02 16:04:10 +02:00
Tobias Koppers df204b8e35 add module graph 2018-08-02 16:04:09 +02:00
Tobias Koppers 8ffcd9161e
Merge pull request #7781 from webpack/refactor/dep_vars
Refactor dependency variables
2018-07-31 09:08:48 +02:00
Tobias Koppers 2e82dbb63c
Merge pull request #7813 from webpack/refactor/freeze_hooks
Freeze hooks to prevent deopts
2018-07-30 22:47:13 +02:00
Florent Cailhol 71016b1433 Remove DependencyBlockVariable 2018-07-30 22:38:13 +02:00
Tobias Koppers cf5f1d723c format existing code 2018-07-30 21:29:21 +02:00
Florent Cailhol fc4f30329d Freeze hooks to prevent deopts 2018-07-30 14:25:40 +02:00
Tobias Koppers 138687730a only assign module ids for modules in chunks
handle weak dependencies without id correctly
2018-07-27 13:16:54 +02:00
Tobias Koppers 3771daba6a Merge tag 'v4.16.3' into next
4.16.3
2018-07-27 12:21:04 +02:00
Tobias Koppers aac43687fd fix case where empty chunkgroups cause nested chunkgroups to vanish 2018-07-27 10:56:01 +02:00
Florent Cailhol 29c99b1787 Convert GraphHelpers 2018-07-26 22:43:20 +02:00
Tobias Koppers bc10939096 add types for Module and subclasses
better way to handle "optional" methods
2018-07-25 12:12:17 +02:00
Tobias Koppers fcf3f63f0e add DependencyTemplate base class and inherit types from this
fix a few typing issues
2018-07-23 20:11:59 +02:00
Tobias Koppers 86ff1a4642 Merge tag 'v4.16.1' into next
4.16.1
2018-07-16 10:30:31 +02:00