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
6928a65911
conflict-free handling of global in import-script
...
use destructuring when available
2020-08-28 11:27:33 +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
Tobias Koppers
2bf2417fe0
improve tests and fix fake type
2020-08-07 17:34:36 +02:00
Robert Lange
834fc01b21
fix: dynamic import promise externals
2020-08-04 19:43:05 +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
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
2fc44c2343
add share plugin
2020-05-26 00:46:09 +02:00
Tobias Koppers
a468cbbd2e
add provide shared module plugin
2020-05-23 16:08:51 +02:00
Tobias Koppers
a66290a15f
add support for async externals
...
add `promise` external
add `import` external (uses import())
add `output.importFunctionName` option to change the `import()` function name
allow for inline external type when using arrays
fix some typings
fix namespace object behavior when using system external and accessing nested property
fix interop behavior for async dynamic modules
2020-05-19 17:25:43 +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
evilebottnawi
dafa4cd69a
chore: setup cspell
2020-03-12 19:51:26 +03:00
Tobias Koppers
d0a33e41c9
Merge pull request #10424 from lcy930323/bugfix/missing_module_template
...
fix(template): Syntax error caused by runtime template
2020-02-26 08:35:53 +01:00
Sunlight
1e9ee8ab0f
fix(template): Syntax error caused by runtime template
2020-02-22 14:20:30 +08:00
Sunlight
13f7c66629
fix(template): Syntax error caused by runtime template
2020-02-21 14:44:44 +08:00
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
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
1d3e1b4208
shorter minimized code for import()
2019-12-06 11:12:04 +01:00
Sergey Melyukov
f212d3c30e
pr comments
2019-12-03 18:11:46 +03:00
Sergey Melyukov
4b499b0429
minor fixes
2019-12-03 17:05:22 +03:00
Sergey Melyukov
faf784b6ab
refactor hop runtime helper
2019-12-03 16:27:39 +03: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
9a07012695
fix problem with accessing the default named export of json
2019-11-05 10:39:14 +01:00
Tobias Koppers
84b6817f60
consistency and bugfixes for reexporting json
2019-11-05 10:39:12 +01:00
Tobias Koppers
14ee25cd0a
add support for tree-shaking JSON modules
2019-11-05 10:37:59 +01:00
evilebottnawi
8764f14794
feat: improve DX with `output.ecmaVersion` option
2019-10-11 00:43:27 +03: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
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
9915088cbc
improvements
2019-07-17 11:57:08 +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
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
180f912493
Merge tag 'v4.29.2' into next
...
4.29.2
2019-02-06 15:37:11 +01:00
Tobias Koppers
9048500acf
remove unneeded moduleGraph argument
2018-12-31 12:32:12 +01:00
Florent Cailhol
a42922f663
Move provided exports to the module graph
2018-12-31 12:28:51 +01:00
Tobias Koppers
9d91861592
Refactor HMR for runtime modules
...
fixed a few HMR bugs
allow other module types for HMR
made HMR more flexible
2018-11-29 16:22:29 +01:00
Tobias Koppers
f753f92c28
ensureChunk to RuntimeModule
...
step 1: non HMR cases
2018-11-29 16:16:39 +01:00
Tobias Koppers
2849281702
remove generateContext from RuntimeModule.generate
...
add public path runtime module
2018-11-29 16:13:26 +01:00
Tobias Koppers
bf1fc171ba
runtime requirement for RuntimeGlobals.moduleFactories
2018-11-29 16:08:52 +01:00
Tobias Koppers
32c3fca477
extract definePropertyGetter into RuntimeModule
2018-11-29 16:08:17 +01:00
Tobias Koppers
7c37a6a972
handle runtime requirements
2018-11-29 16:07:17 +01:00
Tobias Koppers
c1e89c0543
Runtime requirement support in NormalModule, Generators and DependencyTemplate
2018-11-29 16:06:12 +01:00
Tobias Koppers
eb28697419
move magic property names on __webpack_require__ into RuntimeGlobals file
2018-11-05 15:28:34 +01: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
670502fc81
Move AsyncDependenciesBlock.chunkGroup into ChunkGraph
2018-08-22 20:17:49 +02:00
Tobias Koppers
d6cf42e4c2
merge used with usedExports
...
usedExports = false now means module is not used
2018-08-06 21:05:11 +02:00
Tobias Koppers
c4e0a9f72e
Move Module.used and Module.usedExports into ModuleGraph
2018-08-06 21:04:01 +02:00
Florent Cailhol
367b02a0f0
Use RuntimeTemplate to generate error code
2018-07-31 09:01:06 +02:00