Commit Graph

46 Commits

Author SHA1 Message Date
Tobias Koppers 69a545c444 Deprecate MainTemplate, ChunkTemplate, ModuleTemplate
move logic and hooks to JavascriptModulesPlugin
2019-10-08 23:46:26 +02:00
Tobias Koppers f45ba2408e remove items from runtime when unneeded
remove some hooks from MainTemplate, move some hooks to CompatRuntimeModule
add requireScope RuntimeGlobal
2019-10-08 23:46:23 +02:00
Tobias Koppers 1d72a05fed Merge tag 'v4.36.0' into next
4.36.0
2019-07-17 16:02:33 +02:00
ikopeykin 27b1e17f5b createHash typescript 2019-07-10 14:06:36 +03:00
Tobias Koppers c5f94f3b6a don't emit and load JS files for chunks without JS modules
allow custom module types in rules
allow configCases to access stats
2019-05-22 13:12:15 +02:00
Tobias Koppers f2a61b7c5c Avoid different comparators to sort only a single time 2019-01-24 15:14:37 +01:00
Tobias Koppers dff9278d6b add Module.getSourceTypes
getSourceTypes declares all source types which can be generated
Remove shouldRender in favor of source type testing
2018-12-05 20:18: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 0232674f9c Initial runtime module work 2018-11-29 16:03:32 +01:00
Tobias Koppers 197e98a845 filename is always a string 2018-11-01 20:23:09 +01:00
Michael Ciniawsky 56c49bdc9d refactor(TemplatedPathPlugin): split placeholder context (`chunk|module`) 2018-11-01 20:23:09 +01:00
Tobias Koppers a262b83580 remove globalPath and useChunkHash feature
It's no longer needed, because we hash the runtime how
2018-10-24 09:39:51 +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 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 402cf189ce use JavascriptModulesPluginHooks.shouldRender correctly 2018-08-23 16:54:41 +02:00
Tobias Koppers 3aa2280498 move Module.hash and .renderedHash into ChunkGraph 2018-08-22 19:24:54 +02:00
Tobias Koppers 4135c6e683 remove some unnecessary moduleGraph arguments and property accesses 2018-08-22 12:45:14 +02:00
Tobias Koppers 4dfe88edb0 add moduleGraph argument to comparators 2018-08-21 11:08:07 +02:00
Tobias Koppers c21d59f783 Merge tag 'v4.17.0' into next
4.17.0
2018-08-21 11:02:16 +02:00
Tobias Koppers c253b4b130 chunk ids contribute to contenthash for javascript
fixes #7915
2018-08-20 10:04:33 +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 11e127d162 pass moduleGraph along with multiple methods 2018-08-02 17:54:42 +02:00
Tobias Koppers 4ce109f8c1 change arguments of Generator.generate and Module.source into a object to be easier extensible
add JavascriptModulesPlugin.getHooks().shouldRender to decide if a module should be rendered
2018-08-02 16:07:29 +02:00
Tobias Koppers cf5f1d723c format existing code 2018-07-30 21:29:21 +02:00
Florent Cailhol d33f49d96f Rename Parser into JavascriptParser 2018-07-03 14:08:43 +02:00
Tobias Koppers 569de58ec7
use isOnlyInitial instead 2018-06-27 13:55:01 +02:00
Sergey Tatarintsev 2f28947fa0 Fix: entrypoints use filename when runtimeChunk: 'single' is used
Fix #6598
2018-06-26 18:00:24 +02:00
Florent Cailhol 2a9452e51b Add brackets for multiline if/for statements 2018-05-29 15:45:44 +02:00
Mohsen Azimi a7654fb281
Remove extra argument passed to JavascriptGenerator constructor 2018-03-27 20:16:12 -07:00
Tobias Koppers c328c65371 use destructing for more readable code 2018-03-24 12:08:36 +01:00
Tobias Koppers 296542ed79 add [contenthash] support 2018-03-24 12:08:36 +01:00
Florent Cailhol 3983803d30 Destructure 'require' to improve readability 2018-03-22 12:05:58 +01:00
Tobias Koppers 01c18cc301
Merge pull request #6651 from webpack/feature/split-chunks-filename
allow to configure filename for splitted chunks
2018-03-03 17:58:05 +01:00
Tobias Koppers 2c8ea60368 expose stuff and all non-bundle modules 2018-03-03 15:41:30 +01:00
Tobias Koppers ecb65aa75a allow to configure filename for splitted chunks
#6598
2018-03-02 10:14:25 +01:00
Tobias Koppers 5238159d21 run prettier on existing code 2018-02-25 02:00:20 +01:00
Tobias Koppers 5c63d3cb43 move source generation into separate module
allow to pass a Generator to NormalModule
change NormalModule constructor to options object

🍆
2018-01-24 11:33:38 +01:00
Tobias Koppers 66bd2eab83 make render manifest extensible
move JS and WASM specific template stuff into plugins
2018-01-24 09:39:49 +01:00
Florent Cailhol 86e6edf1ab Refactor how source type is handled by the parser 2018-01-22 09:30:43 +01:00
Florent Cailhol 08ddad2e10 Replace NormalModuleFactory#plugin() calls 2017-12-14 14:42:49 +01:00
Florent Cailhol 36c690d37f Use tapable instead of 'plugin' 2017-12-08 14:23:31 +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 0ae5fede3d move parser creation into separate plugins 2017-11-10 11:36:46 +01:00