Commit Graph

49 Commits

Author SHA1 Message Date
alexander-akait a1df00d339 refactor: improve eslint configuration and better types 2025-03-12 04:56:14 +03:00
alexander.akait b07142f672 refactor: module source types code 2024-11-01 00:14:05 +03:00
alexander.akait e10dcf597e fix: types 2024-10-24 06:02:20 +03:00
alexander.akait 6ab9bdaa73 fix: types 2024-02-22 17:20:17 +03:00
alexander.akait 9f63f7013a refactor: more types 2024-02-16 20:39:12 +03:00
alexander.akait ab47c696a4 refactor(types): more 2023-06-03 20:52:25 +03:00
Burhanuddin Udaipurwala 2b4d15a7ba refactor: more instances replaced 2023-05-19 21:30:54 +05:30
alexander.akait 02590bfdc7 chore: improve types 2023-04-21 19:22:33 +03:00
Sean Larkin fa4cbf11a1 add more module type constants, use them across codebase 2023-03-31 10:56:32 -07:00
Asriel Yu 136b723023 fix callback err type should include null 2021-12-24 20:27:31 +08:00
Tobias Koppers 7135727cba avoid unneccessary separators and arrays 2021-10-04 09:29:09 +02:00
shfshanyue 92f84dcac0 chore: merge multi hash.update 2021-09-26 08:51:53 +08:00
Tobias Koppers 18967078cb cleanup modules after compilation to avoid leaking references when they are cached 2021-03-15 11:23:54 +01:00
Tobias Koppers 1265765141 polish, types 2020-07-27 22:41:04 +02:00
Tobias Koppers e16bdfda6c refactor used exports analysis, hashing, code generation, optimizations
to keep track of runtimes, used exports depending on runtime

modules can have different hashes and generated code depending on runtime
chunks are only considered as equal for MergeDuplicateChunks and SplitChunks when exports used in contained modules are equal
added `optimization.usedExports: "global"` to opt-out from used exports analysis per runtime
added `splitChunks.usedExports` and `splitChunks.cacheGroups[x].usedExports` to enable/disable used exports comparing for modules
`splitChunks.usedExports` defaults to `true` in production
2020-07-27 22:40:44 +02:00
Tobias Koppers 77ce747139 remove unneeded code 2020-06-02 12:26:15 +02:00
Martyn Dale 2124b3f684 Add serialization to DllModule and EntryDependency 2020-06-02 12:26:14 +02:00
Nitin Kumar 285529a643
chore: fix typos across the project 2020-03-10 07:29:46 +05:30
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 522d80f33b allocate less for empty Sets for runtime requirements and file/context/missingDependencies 2020-01-29 21:46:14 +01:00
Tobias Koppers b90f3e14a1 upgrade webpack-sources
make source maps and source names context independent

add enhanced-resolve declarations
add types to Module.build
fix tooling for import order to support import renaming
add support for concatenated modules in eval source maps
2019-11-12 08:59:08 +01: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 b80174a069 Improve backward-compat for various things
to enable mini-css-extract-plugin
2019-09-26 22:06:54 +02:00
Tobias Koppers 1d72a05fed Merge tag 'v4.36.0' into next
4.36.0
2019-07-17 16:02:33 +02:00
Tobias Koppers 0c39719729 avoid zero sized modules as they lead to problems 2019-05-13 12:29:29 +02:00
Tobias Koppers cc34ea42b0 add type argument to Module.size
add getSize to Generator
2018-12-05 20:18:59 +01:00
Tobias Koppers 7c37a6a972 handle runtime requirements 2018-11-29 16:07:17 +01:00
Tobias Koppers 4eab41bd5f refactor Module.needBuild to be async 2018-09-27 11:20:54 +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 239ce7fcd9 Use ChunkGraph instead of Compilation in updateHash 2018-08-24 12:02:42 +02:00
Tobias Koppers 402cf189ce use JavascriptModulesPluginHooks.shouldRender correctly 2018-08-23 16:54:41 +02:00
Tobias Koppers eb63cf80d6 move built flag into Compilation 2018-08-22 15:33:16 +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 f68c1f7ab6 add additional arguments to updateHash 2018-08-02 16:04:10 +02:00
Tobias Koppers cf5f1d723c format existing code 2018-07-30 21:29:21 +02:00
Tobias Koppers 22c4756c9e add more types to Module 2018-07-25 12:38:34 +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 8614c75f11 run inherit types tool on existing code 2018-07-21 13:50:18 +02:00
Florent Cailhol 3983803d30 Destructure 'require' to improve readability 2018-03-22 12:05:58 +01:00
Florent Cailhol 63b4523a15 Pass 'context' as constructor argument 2018-01-30 21:40:44 +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 41a1d602e1 added WebAssembly Proof of Concept 2017-11-10 09:17:11 +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
Ahmed El Gabri 0af2125943 refactor(ES6): upgrade DllModule to ES6 (#3762) 2017-01-05 00:03:19 -06:00
e-cloud 13322ca35c add missing constructors for all classes needed
As i walk through the source, i've tried to trace the webpack running stack.
Then, i find the missing constructors result in uncleasr stack and create a patch
for them.
2016-05-20 13:39:36 +08:00
Tobias Koppers ce642eced6 reverted module.e to module.exports
because it causes issues with modules that define
exports on the module object
2016-04-21 23:50:40 +02:00
Tobias Koppers 902220a0ea smaller bundles by using module.e instead of module.exports
same for module.loaded and module.id
2016-02-13 13:11:34 +01:00
Tobias Koppers ded70aef28 moves stuff from webpack-core to webpack-sources 2015-12-29 17:44:55 +01:00
Tobias Koppers 817e678d9a added DllPlugin and dll example 2015-05-16 18:27:59 +02:00