Commit Graph

139 Commits

Author SHA1 Message Date
Tobias Koppers fccc13aaa0
Merge pull request #12907 from webpack/bugfix/assign-library-runtime-chunk
fix problem with strict mode for assigning libraries with separate runtime chunk
2021-03-16 20:54:25 +01:00
Tobias Koppers a93eb10903 fix problem with strict mode for assigning libraries with separate runtime chunk 2021-03-16 19:53:13 +01:00
Ali Al Amine 8dcaade8fc Fix #12908 2021-03-16 20:19:10 +02:00
Tobias Koppers 2abcede6cd
Merge pull request #12852 from chenxsan/test/test-library-type-assign 2021-03-15 20:33:14 +01:00
Tobias Koppers d5992633e6 offer a hook to opt-out of strict mode 2021-03-15 16:38:50 +01:00
Tobias Koppers 69218d4ea0 fix problem with startup of non-js initial chunks
fixes #12880
2021-03-14 19:54:50 +01:00
Tobias Koppers 61cc65c58e improve parsing to handle non-literal options 2021-03-12 12:09:02 +01:00
Tobias Koppers 404a854c8b improve hmr error handling abilities
pass module and moduleId with self error handler
add error handlers for dependency accept handlers
pass moduleId and dependencyId with dependency accept error handler
add output.strictModuleErrorHandling to opt-in into strict module error handling
HotModuleReplacementPlugin enalbed output.strictModuleErrorHandling automatically

fixes #12826
2021-03-09 20:23:00 +01:00
Tobias Koppers 393913dbd8 rename files, avoid indenting runtime code 2021-03-09 09:42:01 +01:00
Tobias Koppers c7f93af138 refactor startup logic to better integrate with libraries
get rid of startupNoDefault and many custom logic regarding this in jsonp chunk loading
add onChunksLoaded runtime method to cover that for all chunk loading types
add `__webpack_runtime_id__` to access the current runtime
allow to use onChunksLoaded for other module types too
2021-03-08 20:25:09 +01:00
Tobias Koppers 5c42b918b4 further optimizations 2021-02-23 12:03:26 +01:00
Tobias Koppers cc6f3d9113 fix regression when combining library + runtimeChunk + node target
related to https://github.com/vercel/next.js/pull/22187
2021-02-18 15:50:40 +01:00
Tobias Koppers 9f3950e571 add support for libraries combined with iife: false
fix missing runtime requirement for system.js context
fix inlining of modules when conflicting symbols are defined on top-level
2021-02-11 11:19:24 +01:00
Tobias Koppers 89e95d6bda newline fixes for startup code 2021-02-09 21:28:10 +01:00
Tobias Koppers b29dd3d224 add renderStartup hook 2021-02-09 21:27:10 +01:00
Tobias Koppers 1c8fe2a8f8 allow module inlining when exports is used 2021-02-09 21:26:23 +01:00
evilebottnawi 938fc8946a refactor: add semicolon 2021-01-27 15:47:04 +03:00
Tobias Koppers a07a1269f0
Merge pull request #11316 from petermetz/master 2021-01-21 11:46:33 +01:00
Tobias Koppers be13a46750 sort imports 2021-01-20 09:51:17 +01:00
Peter Somogyvari ded4cc64a0 perf(parser): binary search for comments in range
Signed-off-by: Peter Somogyvari <peter.metz@unarin.com>
2021-01-19 11:55:35 -08:00
Tobias Koppers a2fd6c2226 disable iife handling for functions with default parameters or patterns 2021-01-19 13:35:50 +01:00
Ivan Kopeykin 9fadec4dc1 fix: walk iife function expression params 2021-01-19 13:35:50 +01:00
Tobias Koppers e9183f9810 only return result of startup when needed
fixes #12244
2021-01-18 19:21:12 +01:00
Tobias Koppers ae15a701a4 fix handling of MetaProperty
fixes #12339
2021-01-05 21:26:28 +01:00
Tobias Koppers 0179d88d4b improve checkEnabled error messages 2021-01-05 11:34:57 +01:00
highonweb bc1911bf78 Changed name of memorize function to memoize 2020-12-27 03:02:57 +05:30
Tobias Koppers 48571c663f add selective runtime requirements from startup logic which doesn't prevent inlining modules
avoid using startup function for grab data from preexecuted chunks
2020-12-11 14:36:48 +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 dbea79cf8a improve code and test case 2020-11-25 22:48:11 +01:00
Ivan Kopeykin f000854cee fix: check statements in path for asi safe 2020-11-25 22:48:10 +01:00
Tobias Koppers 3601b4bfe3 handle ASI issue between concatenated modules
fixes #11897
2020-11-04 12:02:36 +01:00
Tobias Koppers 1b78895c31 improve handling of ASI in concatenated modules and with imports
fixes #11897
2020-11-02 14:15:12 +01:00
Tobias Koppers 11a7cac537 add useSimpleSourceMap flag to enable/disable OriginalSource for generated code
pass reduced options object to Source.map() function
2020-10-26 16:33:38 +01:00
Tobias Koppers 2ec90b3687 add asset info for `sourceFilename` and `javascriptModule` 2020-10-22 10:47:23 +02:00
Tobias Koppers 20c4eff3e7 Merge branch 'master' into bump-acorn-8 2020-10-07 10:35:13 +02:00
Tobias Koppers 8e562aa260 fix some nitpicks with active state 2020-10-07 09:36:41 +02:00
Tobias Koppers fcca1d649d analyse source code for side effects
mark the module as side effects free in such cases
allow 3rd state TRANSITIVE_ONLY to be side-effect-free but dependencies should still be included (for mini-css-extract-plugin)
2020-10-06 14:10:29 +02:00
Huáng Jùnliàng bd902b37ed chore: bump acorn to 8.0.3 2020-10-02 10:13:10 -04:00
Huáng Jùnliàng d1dd411cb3 workaround upstream bug 2020-10-01 18:05:23 -04:00
Huáng Jùnliàng 48be8c4d26 fix typing 2020-09-30 08:49:06 -04:00
Huáng Jùnliàng e142c50a91 revert AcornOptions hotfix 2020-09-30 08:49:05 -04:00
Huáng Jùnliàng aea7ce053d feat: add logical assignment support 2020-09-30 08:49:05 -04:00
Tobias Koppers 6dad1d0d6b use better hash for renderManifest to avoid unnecessary invalidation
add bootstrap code to content hash
2020-09-28 11:42:05 +02:00
Tobias Koppers d770a55ec0
Merge pull request #11474 from webpack/refactor/concatenation
Refactor module concatenation
2020-09-15 15:14:49 +02:00
Tobias Koppers 145d392143 fixes parsing of 'this' in arrow iife
yarnpkg/berry#1832
2020-09-15 13:46:10 +02:00
Tobias Koppers 9af1d7526b refactor module concatenation to address discovered bugs/edge cases 2020-09-15 12:36:02 +02:00
Tobias Koppers 23e91dbbac move module concatenation bailout checks to Module and for NormalModule to Generator 2020-09-15 12:35:59 +02:00
Tobias Koppers fdd4a7713f add ConcatenationScope 2020-09-15 12:34:50 +02:00
Tobias Koppers 7e85649492 improve target options
infer target properties from different targets and fill defaults from that

custom targets can now be created via `target: false` and a plugin (similar to the other options)

add stubs from universal chunk/wasm loading and module chunk format

add externalsPresets.electron and externalsPresets.electronRenderer

node.__file/dirname: "eval-only"
2020-09-10 11:42:09 +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