Commit Graph

57 Commits

Author SHA1 Message Date
alexander.akait 0391116e8c refactor: use runtime logic but only when needed 2023-06-13 00:17:53 +03:00
alexander.akait fcbbacf730 refactor: logic 2023-06-12 21:55:52 +03:00
Andrew Boktor f68ab55320 Adding option to set fetchPriority on script tags 2023-06-12 21:55:52 +03:00
Sean Larkin 4a8035f2b5
Merge pull request #17228 from burhanuday/refactor/burhan-use-globals
refactor: use global constant for __webpack_require__ instead of string literal
2023-05-24 07:16:33 -07:00
alexander.akait f003f1c138 refactor: types more 2023-05-22 05:12:44 +03:00
Burhanuddin Udaipurwala 8d8a0e0e56 refactor: use global constant instead of string literal 2023-05-19 21:25:47 +05:30
Yehor Lvivski 8ccb7faa4b Remove else branch for `if (true)` 2023-05-08 19:07:45 +00:00
alexander.akait 8dbe8ed118 fix: logic for `false` 2023-05-06 04:34:51 +03:00
alexander.akait 56efad7750 fix: use rel modulepreload for esm modules 2023-05-06 04:21:38 +03:00
Ivan Kopeykin 8729f2e787 set crossOrigin=use-credentials without origin check 2022-04-08 15:53:28 +03:00
Tobias Koppers e1179bf9bb fix egde case where a HMR chunk is incorrectly downloaded when loading a unchanged chunk during HMR downloading 2022-04-01 14:45:53 +02:00
Tobias Koppers 49dab4cc5e add semicolon 2022-02-22 09:54:35 +01:00
Ivan Kopeykin 2665fb118c add baseUri entry option 2022-02-21 16:23:47 +03:00
wangqi ae2d96b394 chunkIds[i] -> chunkId 2021-12-29 18:06:43 +08:00
Tobias Koppers b9c6691ff5 bugfixes, external assets 2021-12-03 16:23:09 +01:00
Ivan Kopeykin edeaa6eb82 use "safe" global object 2021-11-23 20:40:03 +03:00
Tobias Koppers 08ea1464d5 keep state of chunk loading during hmr updates
ignore duplicate chunk loads
2021-08-16 13:50:43 +02:00
Tobias Koppers b0fa9ccada pretty files 2021-05-11 09:31:46 +02:00
Tobias Koppers cb494c9a8b fix returning exports from runtime for libraries
fixes #13165
2021-04-22 09:32:17 +02:00
Tobias Koppers d808d04d26 attach the chunk graph to RuntimeModules 2021-04-14 12:26:35 +02:00
Tobias Koppers 7f4ce2cf1a add expressionFunction helper to choose shortest variant when return value is not relevant 2021-03-15 15:40:30 +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 715547c3e0 remove unused code
fix naming for non js entry handling in jsonp chunk loading
2021-03-09 17:19:16 +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 d64227af29 re-add chunkId to script loading when available 2021-01-06 10:08:40 +01:00
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 436be4a029 allow to execute chunks before the runtime has executed
even when the entrypoint has only a single chunk

fixes #12130
2020-12-07 09:32:07 +01:00
Tobias Koppers 7381cc0536 move baseUri into chunk loading runtime modules 2020-08-29 01:59:39 +02: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 14a0aff16c optimize generated code 2020-08-28 10:59:38 +02:00
Tobias Koppers 23d230bdf9 move chunk loading into separate plugins 2020-08-28 10:58:03 +02:00
Tobias Koppers b475d5fd0c swap argument for consistency 2020-08-28 10:58:01 +02:00
Tobias Koppers 805d26b0ae unify config options for jsonpFunction and chunkLoadFunction to chunkLoadingGlobal
rename hotUpdateFunction to hotUpdateGlobal
2020-08-28 10:58:00 +02:00
Tobias Koppers 709e3f1788 remove unused code 2020-08-19 15:08:34 +02:00
Tobias Koppers 8ca593e718 only use chunks with js for entry deferring code 2020-06-24 23:07:17 +02:00
Tobias Koppers 531f7b47f6 move script loading into separate runtime module
attach to existing script tags
2020-06-04 03:01:22 +02:00
Tobias Koppers 2d95f1b8d7 refactor HMR javascript part to reduce duplication
add invalidate to HMR API
2020-04-15 11:12:33 +02:00
Tobias Koppers edecce586b handle dependOn at start of buildChunkGraph
handle jsonp chunk loading correctly for child entrypoints
add error message for incorrect dependOn
2020-02-11 09:12:13 +01:00
Tobias Koppers 6b9d510612 refactor chunk prefetching/preloading into separate plugin and runtime modules 2019-12-19 12:01:46 +01:00
Sergey Melyukov faf784b6ab refactor hop runtime helper 2019-12-03 16:27:39 +03:00
Sergey Melyukov 6b59d113a4 optimize webpack runtime size 2019-12-02 17:59:37 +03:00
Tobias Koppers 18899d2d69 fix problem with retrying import() 2019-10-29 10:25:44 +01:00
evilebottnawi 8198ffb3e6 refactor: code 2019-10-22 00:14:05 +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 b73d35bbee Merge tag 'v4.39.0' into next
4.39.0
2019-08-05 13:12:09 +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 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 abc825d58f Merge tag 'v4.32.0' into next
4.32.0
2019-05-20 14:46:31 +02:00
Michael Loughry 00af3752e2 Use JSON.stringify 2019-01-03 09:48:02 -08:00
Michael Loughry 387de2554b Delete extraneous comment 2019-01-02 20:21:02 -08:00