Commit Graph

169 Commits

Author SHA1 Message Date
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 d46f945572 fix problem when HMR and different runtimes
allow HMR to work in WebWorkers too
2020-11-28 13:53:32 +01:00
Tobias Koppers cbcd459d19 fix conflicting real imports and type imports 2020-11-26 10:02:59 +01:00
Tobias Koppers ac15f06f2a improve handling of exported Promises 2020-11-16 20:24:54 +01:00
Tobias Koppers 590aacc2ae make visible exports from non-harmony modules more consistent
fixes #11995
2020-11-16 17:19:36 +01:00
Tobias Koppers 7661ad868a generate code that executes depending on runtime
fixes #11770
2020-10-27 06:30:49 +01:00
Tobias Koppers f263359fd8 use output.importMetaName for import.meta 2020-09-18 10:55:37 +02:00
Tobias Koppers 2f01aac8ce web worker support for automatic publicPath 2020-09-18 10:31:05 +02:00
Tobias Koppers aa74705297 split auto publicPath into separate module 2020-09-18 10:13:31 +02:00
Tobias Koppers b5719c57e2 improve public path runtime module 2020-09-18 09:48:53 +02:00
Tobias Koppers c67e03abc7 move undo path to runtime module
fix escaping in output code
fix missing contentHashType
2020-09-18 09:10:10 +02:00
Ivan Kopeykin 49009486df support undo path 2020-09-16 23:20:44 +03:00
Ivan Kopeykin fad7712bba support output.importFunctionName 2020-09-15 21:03:05 +03:00
Ivan Kopeykin 580de0873a update publicPath
- support option output.publicPath="auto"
- add test cases
- render import.meta.url for output.scriptType="module"
2020-09-15 00:27:38 +03:00
Ivan Kopeykin 9989071dc8 Merge branch 'master' into dynamically-resolve-public-path 2020-09-14 14:22:52 +03:00
Tobias Koppers ed06a7f83a new Worker() support
add support for async anonymous entrypoints from inside the codebase
add worker example
move entry options into Entrypoint and receive them from there
2020-09-08 07:37:20 +02:00
Tobias Koppers 0f089187e4 improve hashing of runtime modules that need a full hash 2020-09-01 18:31:29 +02:00
Garrett Johnson c09ba8ce81 remove unneeded assignment 2020-08-18 09:37:22 -07:00
Garrett Johnson 8043085c6e log error instead of throwing error 2020-08-17 17:13:17 -07:00
chenxsan fd19fa90b8 add output.charset option 2020-08-17 20:25:27 +08:00
Garrett Johnson 07cbfa0146 check if window exists 2020-08-05 11:17:33 -07:00
Garrett Johnson 0210a45f30 check if window.document exists 2020-08-05 10:58:17 -07:00
Tobias Koppers a69e5dbba8 fix script loading problem with multiple parallel runtimes 2020-08-03 15:28:43 +02:00
Garrett Johnson 71cc102af1 update error log 2020-08-02 20:54:17 -07:00
Garrett Johnson 94973fd240 access document through window 2020-08-02 20:49:48 -07:00
Garrett Johnson 6807bb6f6d remove untested branch 2020-08-02 20:47:45 -07:00
Garrett Johnson 50941e39c8 throw error in fallback case to inform users. 2020-08-02 17:36:44 -07:00
Garrett Johnson ed501824e2 Add logic for dynamically resolving script paths 2020-07-27 20:18:05 -07:00
Tobias Koppers 115aa13577 improve compat for MainTemplate jsonp hooks
improve compat for MainTemplate runtime hooks

fixes #10826
2020-07-03 09:44:55 +02:00
Tobias Koppers 02c01d541b a little more defensive in the chunk loading runtime code to avoid crashes 2020-07-02 15:25:24 +02:00
Tobias Koppers 204e104bc2
Merge pull request #11084 from smelukov/rename-json-script-type
rename jsonScriptType to scriptType
2020-06-29 14:34:21 +02:00
Tobias Koppers 9f28e37969 allow runtimeChunk with node targets
also fixes a incorrect relative path
2020-06-29 11:46:16 +02:00
Sergey Melyukov 139da61b5f rename jsonScriptType to scriptType 2020-06-24 23:05:21 +03:00
Tobias Koppers 2d73392b68 avoid collision in `data-webpack` by adding the uniqueName 2020-06-19 18:55:40 +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 b9c50fdb09 fix jsdoc documentations 2020-04-28 19:42:58 +02:00
Joel Denning 76d5cd579c Exposing System.register _context variable to bundled code.
Making __system_context__ available to code splits.

Fixing git problem

Making PR compatible with webpack 5

Undoing prettier changes to open-bot

Adding test

Triggering build

Triggering build

Reimplementing with new file

Exposing System.register _context variable to bundled code.

Making __system_context__ available to code splits.

Making PR compatible with webpack 5

Undoing prettier changes to open-bot

Adding test

Triggering build

Triggering build

Self review

Self review

Fixing license

Removing deleted file

Fix
2020-02-29 15:24:52 -07:00
Yury Michurin e641c4241d Properly slice the string 2019-12-19 12:03:48 +02:00
Sergey Melyukov f212d3c30e pr comments 2019-12-03 18:11:46 +03:00
Sergey Melyukov faf784b6ab refactor hop runtime helper 2019-12-03 16:27:39 +03:00
Tobias Koppers 497b65e122 run prettier 2019-11-15 10:56:01 +01:00
Tobias Koppers 84b6817f60 consistency and bugfixes for reexporting json 2019-11-05 10:39:12 +01:00
Tobias Koppers 53f68c9e7b update deprecated usage of chunk and main templates 2019-10-08 23:46:33 +02:00
Tobias Koppers f45ba2408e remove items from runtime when unneeded
remove some hooks from MainTemplate, move some hooks to CompatRuntimeModule
add requireScope RuntimeGlobal
2019-10-08 23:46:23 +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 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 fbff5f3c75 allow filename as function at more places
fixes #9296
2019-06-18 22:22:09 +02:00
Tobias Koppers b34da271a1 add sync mode for chunk dependency startup in sync node target
fixes #9154

allow nesting webpack bundles (rename inner __webpack_require__)
to allow testing this
2019-05-20 22:53:58 +02:00
Florent Cailhol 84f9842d54 Add missing types 2019-05-10 09:56:01 +02:00
Tobias Koppers e2e0983f4c remove splitChunks restriction for custom filenames on non-initial chunks
fix bug, which generated incorrect static url mapping for get chunk filename runtime module
optimize generated code for chunk filename (shorter)
2019-02-19 11:16:53 +01:00
Tobias Koppers 180f912493 Merge tag 'v4.29.2' into next
4.29.2
2019-02-06 15:37:11 +01:00
Tobias Koppers f446bf8a9b add ability to load dependent chunks for non-web targets
This allows to use `splitChunks` for initial chunks in i. e. node and webworker targets
2018-12-29 12:48:59 +01:00
Tobias Koppers 0d2faa0d0a
Merge pull request #8460 from webpack/refactor/node_polyfills
Do not polyfill node bindings by default
2018-12-08 12:23:24 +01:00
Tobias Koppers f60c8d8f0e bugfixes and optimizations
optimize name map for name equals id
bugfixes in named ids assigning
assign name before automatic ids
2018-12-07 15:14:14 +01:00
Florent Cailhol 3c50dba922 Remove global buildin 2018-12-07 08:59:41 +01:00
Tobias Koppers 5c7d6d2db6 change ensureHandlers from array to object 2018-11-29 16:23:36 +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 2857ad3ee4 runtime module for getChunkFilename 2018-11-29 16:15:26 +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 540b9a1c35 remove hasOwnProperty global 2018-11-29 16:12:52 +01:00
Tobias Koppers b6d4ece8e8 Runtime Module for compatGetDefaultExport 2018-11-29 16:12:21 +01:00
Tobias Koppers 8803f52ce2 Runtime Module for CreateFakeNamespaceObject 2018-11-29 16:11:44 +01:00
Tobias Koppers dcbd67fdfe Runtime Module for MakeNamespaceObject 2018-11-29 16:11:11 +01:00
Tobias Koppers 32c3fca477 extract definePropertyGetter into RuntimeModule 2018-11-29 16:08:17 +01:00
Tobias Koppers 48958dedd3 convert __webpack_hash__ to runtime module 2018-11-29 16:04:39 +01:00
Tobias Koppers 004a5f6fb4 converted __webpack_chunk_name__ into a runtime module 2018-11-29 16:04:07 +01:00