Commit Graph

262 Commits

Author SHA1 Message Date
Alexander Akait 39bbfbfbb1
feat: support for unmanaged paths 2024-01-04 16:07:29 +03:00
Joe Boyle ec80d13617 clean up modules as well 2023-12-07 21:45:04 -05:00
Joe Boyle 0f517fd125 Clean up child compilation chunk graph
This commit addresses https://github.com/webpack/webpack/issues/17851,
cleaning up child compilation chunk graph which includes references
to the compiler and parent compiler, causing a memory leak.
2023-12-06 23:08:05 -05:00
Sayan751 7d8799ac4b
added unmanagedPaths to snapshot options 2023-10-04 23:28:11 +02:00
alexander.akait cc734af66e refactor(types): more 2023-06-22 02:45:07 +03:00
alexander.akait 27cae68bda feat: allow to use `falsy` loaders and plugins 2023-06-14 18:25:31 +03:00
alexander.akait e0c7b6c48f refactor: errors and lazy loading 2023-06-01 22:55:49 +03:00
alexander.akait 60e5e13eb8 refactor: more types 2023-05-25 01:41:32 +03:00
Nitin Kumar 83d049a1bd fix: handle callback correctly in the `readRecords` compiler hook 2023-04-08 09:42:16 +05:30
Dmitry Semigradsky ba95d08875 chore(deps): replace `json-parse-better-errors` to `json-parse-even-better-errors` 2022-04-16 15:01:53 +03:00
Ivan Kopeykin 3929e688a4 fix discussions 2022-03-28 15:37:52 +03:00
Ivan Kopeykin 449d1786c2 catch error in runAsChild callback 2022-03-23 18:41:16 +03:00
Tobias Speicher 8f56fcba72
Replace deprecated String.prototype.substr()
String.prototype.substr() is deprecated (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substr) so we replace it with slice() which works similarily but isn't deprecated.
Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
2022-03-13 22:54:18 +01:00
Tobias Koppers 8828dfa394 add experimental SyncModuleIdsPlugin 2022-01-20 13:37:28 +01:00
Asriel Yu 136b723023 fix callback err type should include null 2021-12-24 20:27:31 +08:00
Tobias Koppers 7afcc5d4ff allow to disable some deprecations
add `experiments.backCompat: false` (default in `experiments.futureDefaults`)
remove unused `experiments.asset`
enable `experiments.topLevelAwait` and `experiments.asyncWebAssembly` by default in `experiments.futureDefaults`
2021-11-05 09:54:51 +01:00
Tobias Koppers 5e16d642ad allow RegExp as managed and immutable paths
add all node_modules as managedPaths in futureDefaults
2021-10-18 22:56:41 +02:00
Tobias Koppers f05246efcb use buildInfo instead of hash for cacheUnaffected 2021-10-05 15:09:39 +02:00
Tobias Koppers 91b6972144 add memCache2 for mem caching with module/chunk ids 2021-10-05 15:08:18 +02:00
Tobias Koppers 61569e26b9 compare references modules when restoring mem cache 2021-09-29 09:09:42 +02:00
Tobias Koppers 931d14615f move unsafe cache from NormalModuleFactory to Compilation to skip more processing 2021-09-28 11:37:29 +02:00
Tobias Koppers 2393892434 assign each module it's own mem cache
instead of receiving a per module node per access
2021-09-27 20:37:30 +02:00
Tobias Koppers 3b48429eb5 add MemCache for memory caching per module which is invalidated when module or any referenced modules changes
add `experiments.cacheUnaffected`
add `cache.cacheUnaffected` (type: memory) resp `cache.memoryCacheUnaffected` (type: filesystem)
2021-09-24 15:23:29 +02:00
Tobias Koppers 4a8bf4c084 allow to configure all hash functions used
fix default hash function for HttpUriPlugin to sha512
2021-09-23 14:55:13 +02:00
Tobias Koppers 05c1861684 close watching when closing compiler
do not shutdown cache when closing only the watching
2021-08-30 15:01:24 +02:00
Tobias Koppers 8dd38f5c8a refactor 2021-07-16 13:05:18 +02:00
Tobias Koppers b443555501 this is a workaround to remove compilation-specific references from modules in the unsafe cache
I'm not proud of this solution, but it fixes it for now
Long term we might move these kind of references out of the module
into some kind of compilation/module graph specific store.
But that's not yet possible for backward-compat reasons.
2021-07-01 11:46:59 +02:00
Tobias Koppers 8e9daad216 track changes and removals correctly
purge filesystem correctly
2021-05-19 19:06:58 +02:00
Tobias Koppers b0fa9ccada pretty files 2021-05-11 09:31:46 +02:00
Tobias Koppers 87c0d1cd94 Merge branch 'master' into johnnyreilly/master 2021-05-07 18:07:23 +02:00
Tobias Koppers f243907fe8 emit assets even when they were cleaned from fs in the meantime 2021-04-30 11:55:56 +02:00
Tobias Koppers 7cc40782b7 fix some internal types 2021-04-22 21:48:25 +02:00
Tobias Koppers 324a46d908 Revert "dispose code generation results after sealing the compilation"
This reverts commit cef2a8fea0.
2021-04-09 19:50:13 +02:00
Tobias Koppers cef2a8fea0 dispose code generation results after sealing the compilation 2021-04-08 18:33:51 +02:00
Tobias Koppers a3be72b24c avoid leaking memory 2021-04-07 20:50:42 +02:00
Tobias Koppers 8074127b98 avoid leaking memory after the compiler has been closed
clear cache on shutdown
2021-04-01 16:59:48 +02: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 a1515fa9f0 add experimental lazy compilation 2021-01-21 17:39:56 +01:00
Tobias Koppers 013ca3bdd7 add commonjsMagicComments options
move javascript related options from 'module' to 'module.parser.javascript'
2021-01-20 20:19:49 +01:00
Tobias Koppers a2e326129c make filesystem types compatible with memfs and normal fs
fixes #12400
2021-01-13 10:14:58 +01:00
Tobias Koppers 58984b77cb update type annotations 2021-01-11 22:15:31 +01:00
Tobias Koppers 10aa3daede add experiments.layers
add layers to define different module layers
support module layers in stats

add layer support for NormalModules

fixes #11466
2021-01-05 20:50:59 +01:00
Tobias Koppers c2069f8db7 fix handling of multiple identical assets with different querystrings
fixes #11894
2020-12-09 16:10:32 +01:00
Tobias Koppers ccfe01aab4 allow to process assets that are added during processAssets
fix and add processAsset stages

allow to hook into RealContentHashPlugin for custom hashing
2020-11-26 14:00:21 +01:00
Tobias Koppers 214b06645a re-check immutable state when removing a query string
fixes #11820
2020-10-26 16:28:52 +01:00
Tobias Koppers 65eca2e529 expose webpack from Compiler
fix some jsdoc descriptions
2020-10-12 20:16:58 +02:00
Rishabh Chawla bf9ae831bd chore: implement suggestions 2020-09-19 09:53:03 +05:30
Rishabh Chawla 29d17d4dab
feat: add watching property to compiler 2020-09-17 18:31:07 +05:30
Tobias Koppers 8497cd34c6 move start and endTime from Stats to Compilation 2020-09-03 22:01:25 +02:00
Tobias Koppers 2e3a7cda28 setup properties of child compiler before applying plugins 2020-08-28 11:27:34 +02:00