Tobias Koppers
77aed6004a
fix a few edge cases with interop
...
add more test cases
2020-11-03 10:40:39 +01:00
Tobias Koppers
c7a9b8ed06
handle renaming in super class expression in nested scopes correctly
...
fixes #11840
2020-11-02 14:16:04 +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
167fba77cf
handle runtime-dependent code in concatenated modules
2020-10-27 11:43:58 +01:00
Tobias Koppers
0a8529fcb1
fix undetected module references
2020-10-20 13:50:32 +02:00
Karlis Gangis
95eabe47ec
fix: handle star import name collisions in module concatenation
2020-10-20 13:50:56 +03:00
Tobias Koppers
b3c73a543b
fix runtime-specific handling in concatenated modules
2020-10-16 11:47:30 +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
5d9d9b90fb
fix runtime-specific handling in concatenated modules
2020-10-15 10:18:41 +02:00
Tobias Koppers
c00f65bc40
follow reexport in concatenated modules even if they are skipped due to side effects
...
fixes #11662
2020-10-13 10:01:54 +02:00
Tobias Koppers
47097196bd
skip connections copied to concatenated module
...
fixes #11617
2020-10-10 01:14:00 +02:00
Tobias Koppers
8e562aa260
fix some nitpicks with active state
2020-10-07 09:36:41 +02:00
Tobias Koppers
7948cb29df
don't touch not provided exports as they could be on the prototype
...
fix #11580
2020-10-06 15:38:17 +02:00
Tobias Koppers
51b6e9c4d7
fix delete in concatenated module
2020-09-29 22:12:42 +02:00
Tobias Koppers
eddd3206dc
add raw export for named reexport from non-harmony
2020-09-15 12:36:29 +02:00
Tobias Koppers
277d4b1b67
handle export mangling in concatenated modules
2020-09-15 12:36:23 +02:00
Tobias Koppers
9af66ff9af
revert to registering the namespace export because we need to know this early
2020-09-15 12:36:16 +02:00
Tobias Koppers
39e1a7e4c7
move magic names to constants in ConcatenationScope
...
improve types
2020-09-15 12:36:06 +02:00
Tobias Koppers
9af1d7526b
refactor module concatenation to address discovered bugs/edge cases
2020-09-15 12:36:02 +02:00
Tobias Koppers
9941a8a497
create root reexports based on export mappings instead of dependencies
2020-09-15 12:35:55 +02:00
Tobias Koppers
5560415856
create root exports based on export mappings instead of dependencies
2020-09-15 12:35:46 +02:00
Tobias Koppers
91cc17b438
register exports in DependencyTemplates
2020-09-15 12:35:38 +02:00
Tobias Koppers
21e202eb24
move concatenation logic to HarmonyImportSpecifierDependency
2020-09-15 12:35:30 +02:00
Tobias Koppers
fc551fa6f3
move concatenation logic to HarmonyExportExpressionDependency
2020-09-15 12:35:21 +02:00
Tobias Koppers
47344e7e77
move concatenation logic to HarmonyExportSpecifierDependency and HarmonyExportImportedSpecifierDependency
2020-09-15 12:35:13 +02:00
Tobias Koppers
04dde38b4c
move concatenation logic to HarmonyImportSideEffectDependency
2020-09-15 12:35:03 +02:00
Tobias Koppers
fdd4a7713f
add ConcatenationScope
2020-09-15 12:34:50 +02:00
Ivan Kopeykin
a3fc25cadb
refactor asiSafe flag in dependencies
2020-08-29 17:00:03 +03:00
Ivan Kopeykin
35c56e67ae
refactor how asi handled
...
- add asiSafeExpression helper for JavascriptParser
- use asiSafe flag in DefinePlugin
- try to use (...) instead of Object()
2020-08-28 19:46:56 +03:00
Tobias Koppers
c0249af6d1
Merge pull request #11370 from webpack/feature/javascript-parser-improvement
...
use bitmask instead of array+set in getMemberExpressionInfo
2020-08-28 10:08:22 +02:00
Tobias Koppers
49d9ec5625
cleanup public api and expose JavascriptParser
2020-08-28 01:46:14 +02:00
Tobias Koppers
cee47dc867
Store cache dependencies inside of Snapshot to reduce cache size
2020-08-24 18:16:54 +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
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
Ivan Kopeykin
4fc44a3398
add more types
2020-08-02 23:47:54 +03:00
Tobias Koppers
1027268fab
bugfixes
2020-07-28 10:13:34 +02: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
3df380e2d7
add script external
...
change defaults of ModuleFederationPlugin to var library and script remoteType
allow using empty entry in config
2020-06-04 03:18:07 +02:00
Tobias Koppers
fde5b3df11
allow to concatenate modules when used exports are known
2020-05-19 14:42:21 +02:00
Tobias Koppers
f06086c53b
Merge pull request #10631 from mohsen1/mohsen--ts3.9
...
Upgrade to TypeScript 3.9
2020-05-13 17:56:20 +02:00
Tobias Koppers
ba83554d60
keep function declarations when using export default
...
fixes #10870
2020-05-12 22:49:33 +02:00
Mohsen Azimi
042b4ee7d4
Use @ts-expext-error
2020-05-12 14:34:29 +02:00
Tobias Koppers
a643278726
refactor exports info logic always represent exports object instead of namespace object
...
improve test case
2020-04-22 21:01:29 +02:00
Tobias Koppers
7044757751
cleanup, generalization
2020-04-08 22:15:02 +02:00
Mohsen Azimi
7b07a8db66
Upgrade to Prettier 2
2020-03-28 18:20:24 -04:00
evilebottnawi
dafa4cd69a
chore: setup cspell
2020-03-12 19:51:26 +03:00
Nitin Kumar
285529a643
chore: fix typos across the project
2020-03-10 07:29:46 +05:30
Tobias Koppers
6e4b478940
improve exports hoisting in concatenated modules
...
#10409
2020-02-21 20:57:48 +01:00
Tobias Koppers
fdeded05f4
hoist exports to the top of a concatenated module
...
to handle circular dependencies with non-concatenated modules
fixes #10409
2020-02-21 12:21:32 +01:00
Tobias Koppers
3be270d91d
fix bug with renaming of variables in concatenated modules
...
fixes #10308
2020-01-29 20:57:44 +01:00
Tobias Koppers
131e4177ff
remove Array.prototype.reduce calls to simplify code
2020-01-18 19:56:19 +01:00
Tobias Koppers
c80bae2959
faster cache access of contextify
2020-01-15 11:20:22 +01:00
Tobias Koppers
aed6ab1d89
improve renaming of variables in concatenated modules
...
more detailed tracking of conflicted references
to avoid renaming variables when possible
fixes #10168
2019-12-23 21:54:57 +01:00
Tobias Koppers
dda3279221
Merge tag 'v4.41.4'
...
4.41.4
2019-12-19 13:55:43 +01:00
Tobias Koppers
c81963bf6b
fixes #10104
2019-12-17 17:23:54 +01:00
Tobias Koppers
73fd64fc90
refactor
...
refactor ConcatenatedModule to avoid compilation argument
avoid caching inner modules in ConcatenatedModule
improve performance of ModuleConcatenationPlugin
add ModuleStoreError when storing of module fails
2019-12-16 21:08:32 +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
5a01ed8121
rename exportsType named to default
...
exportsType default doesn't include named exports in strict esm
2019-11-20 12:43:53 +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
5abf55b1af
allocate presentationalDependencies array only when needed
2019-11-10 21:05:28 +01:00
Tobias Koppers
ed81ad0fa4
allocate warnings and errors arrays only when needed
2019-11-10 21:05:16 +01:00
Tobias Koppers
efe0c2e610
avoid creating arrays in getConnections
2019-11-10 21:05:05 +01:00
Tobias Koppers
9a07012695
fix problem with accessing the default named export of json
2019-11-05 10:39:14 +01:00
Tobias Koppers
a877cd51d1
add presentational dependencies which are cheaper, but allow only templating
2019-10-30 07:49:20 +01:00
Tobias Koppers
efe3a81325
remove sourceOrder from DependencyReference
2019-10-30 07:48:35 +01:00
Tobias Koppers
8d46b21fad
add Dependency.getCondition and conditional ModuleGraphConnections
...
getDependencyReference is no longer used to check of connection
2019-10-30 07:48:32 +01:00
evilebottnawi
8198ffb3e6
refactor: code
2019-10-22 00:14:05 +02:00
Tobias Koppers
b4d782fb94
remove unused type
2019-10-09 13:54:38 +02:00
Tobias Koppers
3e54494606
remove supportsSymbolsDeconflicting
2019-10-09 11:49:48 +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
b80174a069
Improve backward-compat for various things
...
to enable mini-css-extract-plugin
2019-09-26 22:06:54 +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
9aba345ae7
fix minor bug in concatenated modules
2019-09-03 14:18:01 +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
e507392094
add output.ecmaVersion options to set emitted code style
...
fix a bug with prefetching initial chunks
InitFragments have get[End]Content methods which get a sourceContext
RuntimeModules have implicit chunk and compilation
changed default to `output.ecmaVersion: 2015`
2019-08-26 21:32:29 +02:00
Tobias Koppers
f68bb833d2
Merge export getters in a module into single statement
2019-08-23 14:07:01 +02:00
Tobias Koppers
1eec744a13
generate more efficient external reference in concatenated modules
2019-08-23 09:26:44 +02:00
Tobias Koppers
ddf3566c56
bailed out external ESM in ConcatenatedModule generate property access correctly
2019-08-22 09:58:49 +02:00
Tobias Koppers
c21fb4bd58
Add LazySet for file/context/missingDependencies for performance
2019-08-07 16:13:56 +02:00
Tobias Koppers
7d16eb52f6
track callContext in ConcatenatedModule
...
fixes #9500
2019-07-31 16:05:15 +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
b2e7837288
replace Object.assign with object spread
2019-06-19 13:16:05 +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
fd4b3c503a
pretty files
2019-06-09 11:23:42 +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
ad5a6d105b
Merge tag 'v4.32.2' into next
...
4.32.2
2019-05-23 01:19:34 +02:00
Tobias Koppers
fec26a9503
fix concatenated version of reexport dependency for sideEffects
...
fixes #9159
2019-05-22 21:32:52 +02:00
Tobias Koppers
0c39719729
avoid zero sized modules as they lead to problems
2019-05-13 12:29:29 +02:00
Tobias Koppers
6fc0b96c9c
add MangleExportsPlugin and options
2019-01-31 11:41:30 +01:00
Tobias Koppers
739fef4fda
move usedExports into ExportsInfo
2019-01-28 08:38:37 +01:00
Tobias Koppers
923e16dd5a
remove module argument from getDependencyReference
2019-01-28 08:38:35 +01:00
Tobias Koppers
42007e882a
fixes #8666
2019-01-22 09:13:21 +01:00
Tobias Koppers
d40f7b2642
cache contextify and pass associatedObjectForCache to all calls
2019-01-19 12:40:00 +01:00
Tobias Koppers
a414c616cd
used and provided exports are part of module attributes
2018-12-31 12:29:02 +01:00
Tobias Koppers
4eecad3a83
remove unnecessary copy of modules
2018-12-31 12:28:59 +01:00
Florent Cailhol
a42922f663
Move provided exports to the module graph
2018-12-31 12:28:51 +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