Tobias Koppers
49752a06a8
cleanup asset processing
...
deprecate writing to compilation.assets after sealing.
merge all asset processing into single hook with stages.
Deprecate additionalChunkAssets and optimizeChunkAssets.
Redirect additionalAssets, optimizeAssets to processAssets for backward-compat.
Remove finishAssets hook without deprecation as it was not in v4.
2020-05-22 10:39:21 +02:00
Tobias Koppers
50ec72a6ca
use the full hash on modules that need the full hash of the compilation
...
use getFullHash runtime module for updating the hash in HMR
2020-04-30 17:57:01 +02:00
Tobias Koppers
b9c50fdb09
fix jsdoc documentations
2020-04-28 19:42:58 +02:00
evilebottnawi
3a118ff1cf
chore: setup cspell
2020-03-13 12:13:55 +03:00
Tobias Koppers
6477ca56f8
Split options defaulting in normalization and defaults
...
Apply defaults after plugins are applied to allow plugins to feature their own defaults.
This allows to make preset plugins.
2020-02-17 19:12:54 +01:00
Tobias Koppers
b079429ec8
use correct string or number form of chunk id in HMR
2020-01-15 11:19:25 +01:00
Erik van der Bas - PC
70e9be9158
Assign fallback ChunkGraph to HotUpdateChunks
2019-12-16 13:21:39 +01:00
Tobias Koppers
497b65e122
run prettier
2019-11-15 10:56:01 +01:00
Tobias Koppers
acff6ec992
move BasicEvaluatedExpression and JavascriptParserHelpers to javascript directory
2019-10-22 09:27:52 +02:00
evilebottnawi
8198ffb3e6
refactor: code
2019-10-22 00:14:05 +02:00
Tobias Koppers
ddc3dae0e6
refactor Module.source() and Module.getRuntimeRequirements() into Module.codeGeneration
...
add code generation phase to Compilation
add `output.iife` options to remove iife wrapper
add `experiments.outputModule` which enabled `output.module`
add `output.module` which sets defaults to `output.iife: false`, `output.libraryTarget: "module"`, `output.jsonpScriptType: "module"`, `terserOptions.module: true`
add `output.module` example
improve runtime requirements needed by ConcatenatedModule
add entry inlining, which inlines entry module code into runtime scope (only when safe)
make whole bundle strict when all modules are strict
2019-10-08 23:59:48 +02:00
Tobias Koppers
53f68c9e7b
update deprecated usage of chunk and main templates
2019-10-08 23:46:33 +02:00
Tobias Koppers
69a545c444
Deprecate MainTemplate, ChunkTemplate, ModuleTemplate
...
move logic and hooks to JavascriptModulesPlugin
2019-10-08 23:46:26 +02:00
Tobias Koppers
e116d18544
Merge tag 'v4.40.3' into next
...
4.40.3
2019-09-25 23:51:38 +02:00
Tobias Koppers
1c4138d6ac
HMR plugin should only affect the root compilation
2019-09-23 11:42:48 +02:00
Tobias Koppers
7bde43f47a
Merge tag 'v4.40.0' into next
...
4.40.0
2019-09-13 11:12:26 +02:00
Tobias Koppers
758269e814
add emit/updateAsset to Compilation
...
add asset info with
* immutable for long term cache-able asset
* size for the asset size in bytes
* development for devtools
* hotModuleReplacement for HMR assets
show asset info in stats
2019-09-11 14:43:42 +02:00
Tobias Koppers
ab169893a1
refactor Parser to allow variable tagging
...
use variable tagging in harmony pluging (instead of magic renaming)
Parser no longer calls hooks.expression for x in `x = ...`, hooks.pattern is called instead
remove rootName argument from hooks.expressionMemberChain and hooks.callMemberChain
2019-09-03 14:17:46 +02:00
Tobias Koppers
3cbdb703fc
NullFactory is not required
2019-08-07 16:14:03 +02:00
Tobias Koppers
0505e177f1
add more types and fix/remove TODOs
...
change Chunk.files to Set
remove checkContext from IgnorePlugin
remove external flag from ExternalModule
2019-06-14 10:45:56 +02:00
Florent Cailhol
b12f24d20c
Update hook types
2019-05-10 09:52:22 +02:00
Tobias Koppers
c006675dd9
remove main template hooks for HMRPlugin
2018-11-29 17:14:40 +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
fa0ec849bd
replace renderCurrentHash with RuntimeGlobals.getFullHash
2018-11-29 16:19:22 +01:00
Tobias Koppers
f770143164
Provide module when using module.hot
2018-11-29 16:07:21 +01:00
Tobias Koppers
0232674f9c
Initial runtime module work
2018-11-29 16:03:32 +01:00
Florent Cailhol
3157f5dfb4
Add hook map types
2018-11-12 14:26:33 +01:00
Florent Cailhol
3766869c48
Move normalModuleLoader hook
2018-11-12 14:26:32 +01:00
Tobias Koppers
eb28697419
move magic property names on __webpack_require__ into RuntimeGlobals file
2018-11-05 15:28:34 +01:00
Tobias Koppers
4f813e28a9
remove customizability of __webpack_require__ function name
2018-11-05 13:13:05 +01:00
Tobias Koppers
31e189fcde
Merge tag 'v4.24.0' into next
...
4.24.0
2018-11-02 18:02:39 +01:00
hztianxiang
d66cce2601
add test case by this change
2018-10-30 15:49:48 +08:00
hztianxiang
c5fff759ee
fix lint
2018-10-29 20:39:59 +08:00
hztianxiang
a5e1f30c6b
@ fix 8297 issues
2018-10-29 20:25:06 +08: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
Florent Cailhol
f75027475b
Move HMR hotBoostrap hook
2018-09-07 14:14:10 +02:00
Tobias Koppers
7a43a27eda
make Compilation.chunks a Set
2018-09-06 17:04:01 +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
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
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
ec1329a7d4
make libIdent required
...
add types
2018-08-02 16:29:20 +02:00
Tobias Koppers
c9eb4c8e01
Merge tag 'v4.16.4' into next
...
4.16.4
2018-08-02 16:00:39 +02:00
EECOLOR
2348c3cdc1
Formatting - move arguments to the same line
2018-08-01 10:44:39 +02:00
EECOLOR
7473ed4902
Fix chunkAsset hook call
...
The `compilation.hook.chunkAsset` hook expects 2 parameters, not three.
2018-08-01 10:19:11 +02:00
Tobias Koppers
cf5f1d723c
format existing code
2018-07-30 21:29:21 +02:00
Tobias Koppers
2b14ddc984
Merge tag 'v4.16.0' into next
...
4.16.0
2018-07-11 11:13:47 +02:00
Tobias Koppers
559cf94edb
Simplify imports
2018-07-09 15:09:00 +02:00
Florent Cailhol
838002baad
Add type guard
2018-07-09 08:43:45 +02:00
Florent Cailhol
668c2e428c
Introduce HMRP.hooks instead of extending Parser#hooks
2018-07-09 08:43:45 +02:00
Tobias Koppers
6623a2e292
Merge tag 'v4.15.1' into next
...
4.15.1
2018-07-06 09:33:43 +02:00
Tobias Koppers
6172d3c2eb
fix memory leak with HMR
...
fixes #6929
2018-07-05 11:25:34 +02:00
Florent Cailhol
5bc6b8d50e
Rename ParserHelpers into JavascriptParserHelpers
2018-07-03 14:08:43 +02:00
Florent Cailhol
6097c5f993
Destructure parser helpers
2018-07-03 14:08:43 +02:00
Florent Cailhol
2a9452e51b
Add brackets for multiline if/for statements
2018-05-29 15:45:44 +02:00
Tobias Koppers
f2e5c1e9e8
improve HotModuleReplacementPlugin performance
...
avoid unnessecary rehashing
2018-05-01 10:53:59 +02:00
Tobias Koppers
aee24915ae
Merge pull request #6962 from justinhelmer/bug/6919
...
hot.accept tap interceptor returns T/F based on the number of args
2018-04-17 11:11:31 +02:00
Justin Helmer
2a7fdc4f72
hot.accept tap interceptor returns T/F based on the number of args
...
addresses #6919
2018-04-16 09:23:22 -07:00
Mohsen Azimi
581d19ba88
actually const is fine
2018-04-11 16:04:52 -07:00
Mohsen Azimi
b203091d3f
s/const/let
2018-04-11 16:03:42 -07:00
Mohsen Azimi
1c761339f5
Avoid type mismatch assignment of number to string in HotModuleReplacementPlugin
2018-04-11 09:36:06 -07:00
Florent Cailhol
3983803d30
Destructure 'require' to improve readability
2018-03-22 12:05:58 +01:00
Tobias Koppers
5238159d21
run prettier on existing code
2018-02-25 02:00:20 +01:00
Tobias Koppers
90ab23a7ab
Merge branch 'master' into fix/hmr-before-node-stuff
...
# Conflicts:
# lib/HotModuleReplacementPlugin.js
2018-02-24 13:18:19 +01:00
Florent Cailhol
bcbd878ac4
Fix indent
2018-01-24 10:11:53 +01: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
Florent Cailhol
6192e5b413
Use hooks instead of applyPlugins
2018-01-22 15:23:52 +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
shellscape
8dd3307c08
ensures the HMRPlugin assigns module.hot before NodeStuffPlugin
2018-01-11 11:15:26 -05:00
Florent Cailhol
9f9e730ff3
Use for-of loops instead of forEachModule
2018-01-04 23:15:32 +01:00
Tobias Koppers
ceb95ffabf
add `this.hot` flag to loader context
...
fixes #5891
2018-01-03 16:55:46 +01:00
Florent Cailhol
9669c9e013
Use Parser#hooks instead of Tapable#plugin
2017-12-21 09:08:10 +01:00
Tobias Koppers
a1f889059d
Merge pull request #6136 from ooflorent/template_hooks
...
Use template hooks in plugins
2017-12-18 17:17:21 +01:00
Florent Cailhol
c8e60b4322
Update Parser helpers to be compatible with hooks
2017-12-15 17:08:49 +01:00
Florent Cailhol
3be3878d56
Use templates' Tapable#hooks
2017-12-15 15:16:57 +01:00
Florent Cailhol
08ddad2e10
Replace NormalModuleFactory#plugin() calls
2017-12-14 14:42:49 +01:00
Tobias Koppers
30c9dd05b0
remove `__webpack_require__` requirement from some ConstDependencies
...
fixes #5707
2017-12-13 11:14:00 +01:00
Tobias Koppers
86786811e4
Merge pull request #6085 from webpack/refactor/static-template
...
make all methods on Template static
2017-12-08 17:59:15 +01:00
Florent Cailhol
36c690d37f
Use tapable instead of 'plugin'
2017-12-08 14:23:31 +01:00
Tobias Koppers
16ee68b5f9
make all methods on Template static
2017-12-07 09:49:50 +01:00
Tobias Koppers
88ad7ed186
Merge branch 'refactoring/plugin-system-templates' into refactoring/plugin-system-all
2017-11-29 08:07:18 +01:00
Tobias Koppers
56328a7cab
upgrate tapable in Templates
2017-11-28 18:43:01 +01:00
Tobias Koppers
c10da6c285
upgrade tapable from Parser
2017-11-28 10:25:48 +01:00
Tobias Koppers
e208f44bea
Merge branch 'master' into next
...
# Conflicts:
# lib/Compiler.js
# lib/HotModuleReplacementPlugin.js
2017-11-24 07:42:07 +01:00
Tobias Koppers
991ec20881
fix increasing delay with multiStep HMR
2017-11-23 11:11:32 +01:00
Tobias Koppers
a0ef93f939
aggregate all crypto hash usages into util/createHash
...
try to avoid calling hash.update with short strings
2017-11-23 11:09:17 +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
f7c2f8e470
Update code style to arrow functions
2017-11-08 11:56:01 +01:00
Tobias Koppers
6bd937d768
make things consitent
2017-09-22 14:07:28 +02:00
Tobias Koppers
f6a0d51e6b
Merge branch 'master' into use-set-in-chunks
2017-07-18 09:32:53 +02:00
Kyle Truong
5202091ff8
- Undo previous commit because beautify error
2017-07-01 12:55:45 -04:00
Kyle Truong
be13bf9c7b
- Fix ES6 refactoring lib/HotModuleReplacementPlugin according to codacy coding quality review
2017-07-01 12:27:17 -04:00