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