Commit Graph

542 Commits

Author SHA1 Message Date
Iván Zaera Avellón 39adecf568
fix #12255
When looking for common suffixes, strip the common prefix (if any) from
the items, so that the method doesn't fail when they overlap.
2020-12-22 12:29:08 +01:00
Tobias Koppers 4387e4d972 fix #12232 2020-12-18 21:54:18 +01:00
Tobias Koppers 9563338d90 improve reading of cache file 2020-12-14 13:16:20 +01:00
Tobias Koppers 005bdbbefd fix memory leak when using createReadStream 2020-12-14 11:06:15 +01:00
Tobias Koppers c6311bae62 allow bigger cache sizes 2020-12-14 08:16:08 +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 c847009d87 typescript workarounds
see https://github.com/microsoft/TypeScript/issues/41697
2020-11-30 08:42:35 +01:00
Tobias Koppers d46f945572 fix problem when HMR and different runtimes
allow HMR to work in WebWorkers too
2020-11-28 13:53:32 +01:00
Tobias Koppers 18495151b8 handle the case when execution order in a concatenated module is runtime-dependent
fix #11863
2020-10-29 17:53:56 +01:00
Tobias Koppers 03c795fcd8 handle edge case for boolean matcher 2020-10-27 11:43:54 +01:00
Tobias Koppers 7661ad868a generate code that executes depending on runtime
fixes #11770
2020-10-27 06:30:49 +01:00
Tobias Koppers 0fe03c7af0 fix unused modules in chunk when optimizing runtime-specific
fixes #11673
2020-10-16 11:47:33 +02:00
Tobias Koppers 2888c8a406
Revert "fix unused modules in chunk when optimizing runtime-specific " 2020-10-15 20:17:26 +02:00
Tobias Koppers 50c3a83340 fix unused modules in chunk when optimizing runtime-specific
fixes #11673
2020-10-15 10:18:41 +02:00
Tobias Koppers 65eca2e529 expose webpack from Compiler
fix some jsdoc descriptions
2020-10-12 20:16:58 +02:00
Nitin Kumar 8c8f4c93bb fix: getNumberOfMatchingSizeTypes function call 2020-10-08 09:34:50 +05:30
Sergey Melyukov 8c2e4f595b Merge remote-tracking branch 'upstream/master' into clean 2020-10-07 14:19:55 +03:00
Sergey Melyukov 132ca09a11 (refactor): CleanPlugin 2020-10-07 13:48:51 +03:00
Sergey Melyukov 4b04a4b1f5 (feat): add output.clean 2020-09-30 18:33:30 +03:00
Tobias Koppers 3390ab4c32 update enhanced-resolve and loader-runner for fragment escaping support
add fragment escaping support

fixes #11555
2020-09-30 10:22:26 +02:00
Tobias Koppers 746d377614 improve array to set deprecation for access to the first item 2020-09-25 10:53:12 +02:00
Tobias Koppers 48010fb955 replace output.ecmaVersion with output.environment and more detailed flags 2020-09-10 11:12:28 +02:00
Tobias Koppers 041dfe15c7
Merge pull request #11440 from webpack/bugfix/hmr-incorrect-dispose
fix incorrect disposing of modules during HMR
2020-09-09 03:50:42 +02:00
Tobias Koppers 12997f0a6c fix incorrect disposing of modules during HMR 2020-09-08 10:25:41 +02:00
Tobias Koppers ed06a7f83a new Worker() support
add support for async anonymous entrypoints from inside the codebase
add worker example
move entry options into Entrypoint and receive them from there
2020-09-08 07:37:20 +02:00
Tobias Koppers a778c17fd3 better force handling 2020-09-02 14:10:08 +02:00
Tobias Koppers be021e00f4 add grouping of modules 2020-09-01 18:31:22 +02:00
Tobias Koppers 3ea9400505 add grouping of assets 2020-09-01 18:16:43 +02:00
Tobias Koppers 312e2ab587 Merge branch 'master' into feature/asset-url 2020-08-28 20:54:50 +02:00
Tobias Koppers dff76973e4 type fixes 2020-08-24 18:35:28 +02:00
Tobias Koppers a4a5a76703 make original source in CachedSource lazy 2020-08-24 18:16:56 +02:00
Tobias Koppers 76a6e9b90f create a class for Snapshot for faster access and smaller serialization 2020-08-24 18:16:53 +02:00
Tobias Koppers 5b0379dfca LazySet do not check for duplicate LazySets in addAll 2020-08-24 18:16:52 +02:00
Tobias Koppers 71cf7f4dc8 add support for reexporting in CommonJS
and necessary refactoring + fixes for that
2020-08-17 21:32:47 +02:00
Ivan Kopeykin 4157166263 Merge branch 'master' into feature/asset-url
# Conflicts:
#	test/Defaults.unittest.js
2020-08-16 15:47:05 +03:00
Tobias Koppers 0b66fdacdf StringXor bugfix 2020-08-14 18:40:57 +02:00
Tobias Koppers a0e79afb07 StringXor performance improvement 2020-08-14 16:19:12 +02:00
Tobias Koppers 41a8e2ea48 use xor to hash modules instead of sorting them 2020-08-14 10:54:24 +02:00
Tobias Koppers 50172039bd
Merge pull request #11315 from webpack/refactor/reexport-tracking
track reexport target during providedExports analysis
2020-08-13 17:18:24 +02:00
Tobias Koppers 163e7674a0 track the target binding of harmony reexports
display target binding in module info header
check conflicting star exports (fixes #7562) when statically known
2020-08-11 20:13:01 +02:00
chenxsan 94e47d5721 fix ExternalModule bug 2020-08-11 20:42:32 +08:00
Ivan Kopeykin 8cf511dc94 Merge branch 'master' into chore/todos-to-defined-types 2020-08-06 22:48:20 +03:00
Ivan Kopeykin 6a7978f1bc support persistent cache 2020-08-06 20:00:22 +03:00
Tobias Koppers b951d08930
Merge pull request #11271 from mpeyper/bugfix/versionlt-runtime-issue
fix: minified versionLt did not match the original function
2020-08-05 09:32:18 +02:00
Tobias Koppers 6e71413a3e generate runtime code with special-lint-fix
verify runtime code in CI
2020-08-05 08:45:51 +02:00
Michael Peyper f3688dfb57 fix: minified versionLt did not match the original function 2020-08-04 20:08:05 +10:00
Tobias Koppers 305dab3ae1 improve and fix backtracing to root folder from nested directories 2020-08-04 09:36:49 +02:00
Ivan Kopeykin 4fc44a3398 add more types 2020-08-02 23:47:54 +03:00
Tobias Koppers a4f17775b1 fix dependOn behavior with runtimes, fix runtime passing by entry 2020-07-30 11:18:09 +02:00
Tobias Koppers 77cdce7393 remove unused methods, improve code coverage 2020-07-29 11:14:26 +02:00
Tobias Koppers 3465b00a62 performance, cleanup 2020-07-28 22:05:13 +02:00
Tobias Koppers 6b4ce6e011 improve HMR plugin with multiple runtimes 2020-07-28 14:06: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 b1eac4ab29 Use computed resolve options in context alternatives
deprecate ContextModuleFactory.hooks.alternatives because we need the options in the hook
2020-07-15 14:13:35 +02:00
Tobias Koppers 4e32a3f3de performance improvements
only add `browser` condition on web targets
default options should not share objects
check for "..." from reverse as this is more likly
2020-07-15 14:13:33 +02:00
Tobias Koppers 0d857e3942 Improve cleverMerge to respect byDependency order correctly
Allow to use "..." in `option.resolve` too
Add "..." to schema when needed

Apply dependency specific mainFields, aliasFields and conditionNames only
for cjs and esm dependencies or when none is specified for backward-compat.
2020-07-15 14:13:31 +02:00
Tobias Koppers fd9b399ae9 Create Cache facade to make it easier to use
add missing serializers for classes used in test suite
2020-07-15 11:14:28 +02:00
Tobias Koppers 6c425546df Avoid using real watchers in MultiWatching test case
add watchFileSystem to MultiCompiler and typings
2020-07-08 11:17:00 +02:00
Tobias Koppers e27eb830f7
Merge pull request #11105 from webpack/mf/semver
add full Semantic Versioning for Shared Modules
2020-07-06 23:18:00 +02:00
Tobias Koppers d9435e0e3e
Merge pull request #11075 from vankop/import-meta
add import.meta support
2020-07-06 20:19:23 +02:00
Tobias Koppers 1bb02df61e
Merge pull request #11095 from vankop/support-url-requests
Support url requests
2020-07-06 20:03:52 +02:00
Tobias Koppers 5f4c4662dd rename parsePathQueryFragment to parseResource and add caching 2020-07-06 17:39:52 +02:00
Tobias Koppers 7dad1c1c30 refactor scheme handling into plugins 2020-07-03 17:01:02 +02:00
Tobias Koppers a11922fea3 improve windows absolute path detection 2020-07-03 10:18:41 +02:00
Tobias Koppers 92472698d7 fix edge case of string with number compare 2020-07-02 16:10:04 +02:00
Tobias Koppers 67acac367b fix logic handling build version
build version should be ignored in matching ranges
2020-07-02 16:10:01 +02:00
Tobias Koppers 2689d026b1 refactor semver logic to be internal
share scope uses string version instead of parsed one
2020-07-02 16:09:57 +02:00
Tobias Koppers 7ef92097b4 Size optimization 2020-07-02 16:09:48 +02:00
Tobias Koppers 33945ad2b3 fix matching of string version in prerelease ranges
versions are in a contiguous range of:
0, 1, ..., 9, 10, 11, ..., 100, ..., a, b, c, ..., alpha, ..., beta, ..., etc, ...
2020-07-02 16:09:48 +02:00
Tobias Koppers 3fcd5f9bc5 add full Semantic Versioning for Shared Modules
change storage format in the share scope
choose shared module deterministic from the same origin
remove array syntax from version and requiredVersion in schema
2020-07-02 16:09:39 +02:00
Tobias Koppers 23f922bed3 make bundles with Module Federation more stable 2020-07-02 15:28:17 +02:00
Ivan Kopeykin d42d2b51df check for Windows absolute url in URLAbsoluteSpecifier util 2020-06-29 12:24:44 +03:00
Ivan Kopeykin 89abab2631 add absolute url specifier support 2020-06-26 22:16:27 +03:00
Ivan Kopeykin de18533373 update import.meta
- add evaluation to import.meta and import.meta.url
- bare import.meta is disallowed
2020-06-24 22:47:43 +03:00
Ivan Kopeykin 4cd526f970 hmr support update
- import.meta.hot to import.meta.webpackHot
- create separate tests for import.meta.webpackHot
- remove HMRApiDependency in favor of ConstDependency
2020-06-24 17:22:28 +03:00
Tobias Koppers 854c67b6b9
Merge pull request #11070 from webpack/feature/split-chunk-improvements
Feature/split chunk improvements
2020-06-24 11:09:24 +02:00
Tobias Koppers ba9027ac1a
Merge pull request #10719 from goganchic/feature/data-uri
Implement Data URI imports
2020-06-24 11:08:44 +02:00
Ivan Kopeykin 1beb4e5707 support import.meta 2020-06-23 01:03:52 +03:00
Ivan Kopeykin 104845a419 support import.meta.hot 2020-06-22 18:49:57 +03:00
Tobias Koppers ab01c0628e fixes #11026 2020-06-22 09:31:03 +02:00
Tobias Koppers 630ebfdf47 rename module federation classes for be more specific 2020-06-18 15:11:29 +02:00
Tobias Koppers 0397701d85 improve types, moved byDependency logic into ResolverFactory 2020-06-17 22:17:14 +02:00
Ivan Kopeykin 198e51a485 Merge branch 'master' into exports-field
# Conflicts:
#	lib/dependencies/ImportDependency.js
#	lib/sharing/ConsumeSharedPlugin.js
#	lib/sharing/ProvideSharedPlugin.js
#	types.d.ts
2020-06-16 21:16:41 +03:00
Tobias Koppers c00fec3aa7
Merge pull request #10964 from pushkar100/feature/lazy-load-named-exports
Lazy loading only required exports from dynamic import()
2020-06-16 15:04:06 +02:00
Tobias Koppers 1c42f71250 allow to provide and consume multiple versions of shared modules 2020-06-13 14:45:37 +02:00
Tobias Koppers a4ac8f0328 Cleanup 2020-06-10 14:01:24 +02:00
Ivan Kopeykin d2a08e3cc8 rework how byDependency applied
remove dependencyType parameter for resolver factory
add dependencyType option in enhanced resolve options
2020-06-09 01:32:24 +03:00
goganchic 819dd10a22 rename dataURIMimetype and remove redundant regex check 2020-06-05 16:08:06 +03:00
goganchic 4b59a302a2 add mimetype rule 2020-06-05 15:15:11 +03:00
goganchic 19609937c7 implement uri imports 2020-06-05 15:15:10 +03:00
Martyn Dale 2124b3f684 Add serialization to DllModule and EntryDependency 2020-06-02 12:26:14 +02:00
Martyn Dale 1eaf3150fe Add serialization to DelegatedModule.js and DelegatedSourceDependency.js
Add the applicable serialize and deserialize functions to the Modules and add to internalSerializables
2020-06-02 12:26:09 +02:00
Ivan Kopeykin 57bd6ed348 Merge branch 'master' into exports-field
# Conflicts:
#	lib/container/OverridablesPlugin.js
2020-06-01 15:14:47 +03:00
Tobias Koppers 707a103262 merge resolve.byDependency defaults with user provided values
allow to use resolve.byDependency in module.rules
2020-05-28 19:55:14 +02:00
Tobias Koppers e78a76b2e0 remove all overrides and overridables related code 2020-05-26 17:26:28 +02:00
Tobias Koppers edf03440ba add SharePlugin
let ModuleFederationPlugin use the SharePlugin
update container test cases to new behavior
2020-05-26 17:11:21 +02:00
Tobias Koppers 1b3246361b add consume shared module plugin 2020-05-25 23:14:19 +02:00
Tobias Koppers e659ec494c add provide shared module plugin 2020-05-25 17:14:59 +02:00
Tobias Koppers a468cbbd2e add provide shared module plugin 2020-05-23 16:08:51 +02:00
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
Nathan Shively-Sanders 362514c10b fix 4.0 build errors 2020-05-12 14:37:09 +02:00
Mohsen Azimi 042b4ee7d4 Use @ts-expext-error 2020-05-12 14:34:29 +02:00
Tobias Koppers 6b13cafa20 dedupe remote overrides
fix transitive overriding
fix missing overriables for empty overridables
2020-05-04 15:01:50 +02:00
Tobias Koppers a92189e26d fix persistent caching for container modules 2020-04-29 13:08:34 +02:00
Tobias Koppers 004a24760a make ContainerEntryModule serializable 2020-04-29 12:45:54 +02:00
Tobias Koppers a432c3ff18 Merge branch 'master' into dev-1 2020-04-29 12:39:07 +02:00
Tobias Koppers b9c50fdb09 fix jsdoc documentations 2020-04-28 19:42:58 +02:00
Tobias Koppers 5887c20ab0 Merge tag 'v5.0.0-beta.15' into dev-1
5.0.0-beta.15
2020-04-22 07:37:49 +02:00
Tobias Koppers 3f9e6d5ec6 move tooling into separate repo, add type generation and test types 2020-04-21 09:25:38 +02:00
Tobias Koppers 618960469d ignore DebugHash class 2020-04-17 10:53:30 +02:00
Tobias Koppers e80bcac1b5 ignore coverage for toStringTag 2020-04-17 09:42:09 +02:00
Tobias Koppers 49a6184e20 add tests to increase code coverage 2020-04-16 22:20:04 +02:00
Tobias Koppers d5c31ab864 Merge branch 'master' into dev-1 2020-04-14 12:48:38 +02:00
Ivan Kopeykin 2d451a57b2 feat: new dependency __webpack_is_included__ 2020-04-12 03:04:41 +03:00
Mohsen Azimi 7b07a8db66 Upgrade to Prettier 2 2020-03-28 18:20:24 -04:00
Tobias Koppers 575d6aa4f0 Merge branch 'master' into dev-1 2020-03-20 09:58:13 +01:00
evilebottnawi b16a345e9f chore: setup cspell 2020-03-13 12:28:55 +03:00
evilebottnawi 02844747a7 chore: setup cspell 2020-03-13 12:27:45 +03:00
evilebottnawi dafa4cd69a chore: setup cspell 2020-03-12 19:51:26 +03:00
Tobias Koppers d102340a3d cleanup open things 2020-02-26 23:53:44 +01:00
Marais Rossouw 905f2475ff feat: Adds ContainerPlugin
Co-authored-by: Zack Jackson <zackary.l.jackson@gmail.com>
2020-02-26 17:47:15 +01:00
Tobias Koppers 83b7faa67c get rid of hack for remote override module 2020-02-26 17:16:01 +01:00
Tobias Koppers 8792aa0830 add ContainerReferencePlugin 2020-02-26 16:42:24 +01:00
Tobias Koppers 1c630f1435 add OverridablesPlugin 2020-02-24 15:15:23 +01:00
Tobias Koppers cb543a444c seralization class for resolver cache 2020-01-28 11:35:29 +01:00
Tobias Koppers 712f2bbda1 shorter LazySet serialization 2020-01-28 11:35:21 +01:00
Tobias Koppers b40a345451 refactor Persistent Cache
cache is split into multiple .pack files which represent usage of cache items
this allows to only read/deserialize files that are needed
and reduces the need to rewrite .pack files
while still packaging multiple cache items together

lazy (de)serialization system has changed to allow writeLazy and writeSeparate
2020-01-28 11:35:06 +01:00
Tobias Koppers c80bae2959 faster cache access of contextify 2020-01-15 11:20:22 +01:00
Sergey Melyukov 5d18a8e27d persistent cache for concat modules 2019-12-16 21:06:24 +01:00
Tobias Koppers 782e4535ac Refactor how exportsType work
add flagged exportsType for __esModule flagged
add getExportsType to merge strict with exportsType
move CommonJsStuffPlugin into CommonJsPlugin
split CommonJsPlugin into imports and exports part
enable minimal tree shaking for CommonJs imports and exports
2019-12-06 11:13:08 +01:00
Tobias Koppers accd66c3ba
Merge pull request #9971 from smelukov/deprecation-codes
Add deprecation codes
2019-11-15 12:04:47 +01:00
Tobias Koppers e9f8e63593 Make RestoreProvidedData a custom class for visibility in profiles 2019-11-14 20:58:05 +01:00
Sergey Melyukov a214be41a0 add deprecation codes 2019-11-14 17:03:15 +03:00
Tobias Koppers 137363c5de more space-efficient ReplaceSource serialization 2019-11-13 12:19:00 +01:00
Tobias Koppers 8aafff6600 Cut off long calback chains in the queue 2019-11-12 12:21:47 +01:00
Tobias Koppers 2d302db632 use setImmediate to start queue processing after I/O 2019-11-12 11:49:51 +01:00
Tobias Koppers d7b9127e59 upgrade webpack-sources
use public methods for serialization
2019-11-12 09:40:23 +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 14ee25cd0a add support for tree-shaking JSON modules 2019-11-05 10:37:59 +01:00
Tobias Koppers e8f2a8329d avoid emitting files when they already exits in output filesystem 2019-11-04 09:23:18 +01:00
Tobias Koppers 4cc4b4010e make LazySet serializable 2019-11-01 12:21:15 +01:00
Tobias Koppers 6b352c244a make RequireIncludeDeprecationWarning serialize-able 2019-10-30 07:49:24 +01:00
Tobias Koppers 41d23461b8 flatten LazySet before merging to find duplicate inner Sets 2019-10-28 14:10:55 +01:00
Tobias Koppers a1cfefe821 fix typescript regression 2019-10-22 11:04:48 +02:00
Tobias Koppers 6b9ec2adfa
Merge pull request #9801 from webpack/compat/avoid-dynamic-require
avoid a dynamic require in lib/util/serialization
2019-10-11 12:12:59 +02:00
Tobias Koppers 686725a6c3 avoid a dynamic require in lib/util/serialization
this allows ncc to upgrade
2019-10-11 10:01:08 +02:00
evilebottnawi 8764f14794 feat: improve DX with `output.ecmaVersion` option 2019-10-11 00:43:27 +03:00
Tobias Koppers 69a545c444 Deprecate MainTemplate, ChunkTemplate, ModuleTemplate
move logic and hooks to JavascriptModulesPlugin
2019-10-08 23:46:26 +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 f7f408372f Merge tag 'v4.41.0' into next
4.41.0
2019-09-26 21:41:52 +02:00
Tobias Koppers 6f1c685071 Improve performance of LimitChunkCountPlugin a lot 2019-09-24 16:32:20 +02:00
Tobias Koppers ec518945f1 fix edge case in scope analysis
fix double declaration problem in variable declarations
remove TrackingSet
rename StackedSetMap to StackedMap and remove add method
add more scope analysis test
2019-09-05 13:34:16 +02:00
Tobias Koppers d3cf3928f5 Persistent Caching fixes
improve error handling in pack file cache strategy
support context timestamp snapshot
make ContextModule serializable
fix snapshotting bug of managed paths
use managed and immutable path info for context hashes and timestamps
enabled managedPaths for node_modules during cache tests
2019-09-04 16:33:54 +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 2fc72052c4 Remove hashing from ClassSerializer as buildDeps take care of this now 2019-08-13 17:02:52 +02:00
Tobias Koppers e5cecdad23 store build dependencies snapshot in pack
add snapshot shortcut for package manager managed paths
add cache.managedPaths
2019-08-13 17:02:37 +02:00
Tobias Koppers ada11a286d avoid memory leak in LazySet 2019-08-12 23:07:45 +02:00
Tobias Koppers f236df1bc9 replace logging in persistent caching with infrastructure logger
remove cache.loglevel
2019-08-12 13:41:23 +02:00
Tobias Koppers c21fb4bd58 Add LazySet for file/context/missingDependencies for performance 2019-08-07 16:13:56 +02:00
Tobias Koppers ab8f0b9191 Use Set prototype for better deprecation performance 2019-07-26 13:46:24 +02:00
Tobias Koppers 8fc13d829c cache hash digest for short data 2019-07-25 07:41:23 +02:00
Tobias Koppers e2b1ab3258 adding some random types 2019-07-18 14:15:20 +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 b3ec775453 improve merging of resolve and parsing options
by rules and via loader API

Arrays overwrite by default, but can reference old value with "..."
2019-07-17 13:08:51 +02:00
ikopeykin bd7d95bfc1 #9391 resolve discussions, AbstractMethodError 2019-07-15 16:54:49 +03:00
ikopeykin a223ffdcc0 fix typescript for HashContructor 2019-07-10 14:16:09 +03:00
ikopeykin 27b1e17f5b createHash typescript 2019-07-10 14:06:36 +03:00
ikopeykin a1aa5cbdce enforce eslint check-tag-names to avoid using jsdoc tags that are not supported in Typescript 2019-07-10 00:38:18 +03:00
ikopeykin 30e747a55d enforce eslint require-hyphen-before-param-description 2019-07-09 23:15:14 +03:00
Tobias Koppers b2e7837288 replace Object.assign with object spread 2019-06-19 13:16:05 +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
Tobias Koppers 6db94536ad Merge tag 'v4.34.0' into next
4.34.0
2019-06-13 10:51:12 +02:00
Tobias Koppers e9c0d068dd refactor filesystem interfaces
add Compiler.intermediateFileSystem
avoid using `path` and `fs` module when possible
move `join`, `mkdirp` and `dirname` into utils
join and dirname is optional in FileSystem interface
remove mkdirp from Filesystem interface
2019-06-11 17:32:58 +02:00
Tobias Koppers 43bc7a306e Refactor to track nested exports
Harmony dependencies track access to nested properties
Flag nested exports
2019-05-29 11:55:00 +02: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 f03c4f127a improve merging of resolve and parsing options
by rules and via loader API

Objects are deeply merged
Arrays overwrite by default, but can reference old value with "..."

fixes #8968
2019-05-13 15:30:10 +02:00
Florent Cailhol 84f9842d54 Add missing types 2019-05-10 09:56:01 +02:00
Tobias Koppers 924daa105b Use simpler/faster hash function to get a hash number
Use deterministic mangled names for exports
refactor assignDeterministicIds
rename __webpack_init__ function in wasm to ""
fix bug with incorrectly cached StaticExportsDependency
fix bug in hash logic of Module
2019-02-20 22:41:07 +01:00
Tobias Koppers b25ff237bb Prettify source code 2019-02-05 10:08:45 +01:00
Tobias Koppers e9c6539645 change Serializer API to be not file serialization specific 2019-01-24 17:42:38 +01:00
Tobias Koppers 3a1eefec0a Measure size of objects to decide about inline or lazy storing 2019-01-24 15:14:41 +01:00
Tobias Koppers d40f7b2642 cache contextify and pass associatedObjectForCache to all calls 2019-01-19 12:40:00 +01:00
Tobias Koppers 00065741d2 log a warning when serialization fails 2019-01-19 11:47:19 +01:00
Tobias Koppers c5ad6df793 add own webpack-sources typings 2019-01-18 21:56:56 +01:00
Tobias Koppers 0bc0f05fc7 use updated webpack-sources, use new buffer method 2019-01-18 20:46:31 +01:00
Tobias Koppers 61a096049d add process.nextTick to avoid long recursion in callbacks 2019-01-10 16:41:30 +01:00
Mihail Bodrov fa5bc5bc1f Use limit for array split 2019-01-09 23:35:18 +03:00
Tobias Koppers 526bc7a788 removed queue entry from AsyncQueue on invalidate 2019-01-08 15:14:31 +01:00
Tobias Koppers 4bdf08df7b AsyncQueue._queued to array, remove nextTick 2019-01-08 15:14:29 +01:00
Tobias Koppers 1053620f46 merge Maps and Sets into single Map with all info 2019-01-08 15:14:27 +01:00
Florent Cailhol 80f67573a1 Expose API types 2018-12-28 14:48:18 +01:00
Florent Cailhol f05af4a4a7 Use serialization API instead of ObjectMiddleware 2018-12-28 13:54:10 +01:00
Florent Cailhol e06a808763 Expose the serialization API 2018-12-28 13:21:19 +01:00
Tobias Koppers 2143bd6519 Reduce number of allocations
Hoist RegExp
Avoid creating array object
Avoid join
Fast case for request without query
improve test cases
fixes a bug where query was omitted with multiple query separators
2018-12-26 11:13:44 +01:00
Mihail Bodrov 972d9bf8cb Optimize absoluteToRequest 2018-12-23 15:30:28 +03:00
Tobias Koppers d9238f061d memorize lazy data on access
remove need for read on write
add queue for file accesses in FileMiddleware to support concurrent access
2018-12-21 12:05:29 +01:00
Tobias Koppers 2ae5268bfa
Merge pull request #8525 from webpack/cleanup/remove-compare
cleanup work on next
2018-12-20 20:23:52 +01:00
Tobias Koppers e36dec26d1 cache crypto require in createHash 2018-12-20 17:32:55 +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 aedc34b76d load internal serializers internally
allows to bundle webpack
2018-12-20 11:04:31 +01:00
Florent Cailhol e06b4853d6 Add compiler typings 2018-12-12 10:26:53 +01:00
Tobias Koppers d71fdf0a29 don't split identifier at space, as space could to part of paths 2018-12-08 09:29:21 +01:00
Tobias Koppers 4c965bfbab simplify regex 2018-12-08 09:21:35 +01:00
Tobias Koppers 5563ee9e58 use makePathsRelative instead of contextify
unify contextify and makePathsRelative
separate NormalModuleFactory ignored, ContextModule and ConcatenatedModule identifier with "|"
2018-12-07 18:12:04 +01:00
Tobias Koppers 8281667668 improve ids for Long Term Caching
add deterministic chunk ids and make it default
StatsTestCases no longer need to explicitly use natural ids as the defaults are deterministic now too
add concept of id name hints for chunks
add `idHint` option to splitChunks to provide a hint
deduplicated code from different id plugins to IdHelpers
improve behavior of named ids in case of conflicts
remove `name: true` and `automaticNamePrefix` from splitChunks it's not as good as expected
improve named chunk ids to show root modules
2018-12-07 12:26:35 +01:00
Tobias Koppers bc667a50b1 algorithm improvements 2018-12-06 21:00:57 +01:00
Tobias Koppers e5e0f44e29 add algorithm to extract graph roots
show only graph roots in chunks by default
2018-12-06 20:57:04 +01:00
Tobias Koppers 30a68b20c7 support different size types in SplitChunksPlugin 2018-12-05 20:23:40 +01:00
Tobias Koppers 5fb6c5ea18
Merge pull request #8418 from webpack/types/misc
Preliminary work before typing the parsers
2018-11-29 15:48:56 +01:00
Tobias Koppers fa87116ea1 Merge tag 'v4.26.1' into next
4.26.1
2018-11-29 14:51:27 +01:00
Florent Cailhol cc739eb83a Minor optimizations 2018-11-26 16:26:18 +01:00
Florent Cailhol 57ca3f5fa3 Type internal data structures 2018-11-25 21:12:28 +01:00
Tobias Koppers cbeaf70dfd prevent groups with size < minSize
fixes #8407
2018-11-25 11:41:30 +01:00
Tobias Koppers 32961f2aac while grouping nodes include at least one node on each side
fixes #8407
2018-11-24 08:01:59 +01:00
Tobias Koppers e1c77f64e8
Merge pull request #8231 from webpack/ci-node-nightly-next
Some minor fixes and comments
2018-11-05 09:16:29 +01:00
Florent Cailhol c747449c65 Simplify objectToMap by using Object.entries 2018-11-02 11:22:18 +01:00
Tobias Koppers e3c63b4424 improve debug hash with stack trace 2018-11-01 20:21:33 +01:00
Tobias Koppers 767b15f3b9 add comment 2018-11-01 20:21:33 +01:00
Tobias Koppers 590772b934 add packed store mode 2018-10-30 09:54:40 +01:00
Tobias Koppers e9db83c6c7 add serializer for acorn Position 2018-10-29 22:16:40 +01:00
Tobias Koppers 1e29c44df3 move natural chunk comparator to comparators
add name order to natural chunk order
2018-10-23 11:32:34 +02:00
Tobias Koppers 4b69df1117 allow to make classes not-serializable
make ContextModule not-serializable because it's not needed
2018-10-18 15:52:22 +02:00
Tobias Koppers 4947a5ac71 allow all Sources to be serialized
serialize internal structure of CachedSource
2018-10-18 12:44:27 +02:00
Michael Ciniawsky 0ebf871e25 feat(registerExternalSerializer): add SourceMapSource support 2018-10-17 21:25:41 +02:00
Tobias Koppers a852828279 add persistent caching prototype 2018-10-17 21:25:39 +02:00
Tobias Koppers 5f1a30d2ef fixup: AsyncQueue 2018-09-27 13:20:23 +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 46232fab31 make Compilation.addModule async and queued 2018-09-27 11:21:11 +02:00
Tobias Koppers 6dc4b5c876
Merge pull request #8017 from webpack/refactor/compilation
Refactor compilation
2018-09-12 14:57:31 +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 3c244d9fc9 Optimize error origin handling and module trace
Improve warnings and errors sorting
2018-09-12 13:16:59 +02:00
Tobias Koppers 9522ad72b3 make deprecations less noisy 2018-09-12 13:13:55 +02:00
Tobias Koppers 7a43a27eda make Compilation.chunks a Set 2018-09-06 17:04:01 +02:00
Tobias Koppers 4a959b8b83 improve SetHelpers typings 2018-09-06 17:02:20 +02:00
Tobias Koppers f47febd045 add deprecation helpers 2018-09-06 17:02:19 +02:00
Tobias Koppers 0eafdffd0e Stabilize stats item order 2018-09-06 16:05:26 +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
Tobias Koppers 604460da52 move iterable compare code to comparators 2018-08-28 15:10:30 +02:00
Tobias Koppers b669bec324 add caching to higher-order comparators 2018-08-28 15:09:09 +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 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 c21d59f783 Merge tag 'v4.17.0' into next
4.17.0
2018-08-21 11:02:16 +02:00
Mihail Bodrov 1f954b4f12 Get rid typeof undef in all lib 2018-08-21 03:26:50 +03: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 c4e0a9f72e Move Module.used and Module.usedExports into ModuleGraph 2018-08-06 21:04:01 +02:00
Tobias Koppers cf5f1d723c format existing code 2018-07-30 21:29:21 +02:00