Commit Graph

280 Commits

Author SHA1 Message Date
Tobias Koppers a1f0d23dcc add `node-commonjs` external type to use `createRequire` for commonjs externals
for `module` externals, fallback to `import()` when not in module mode
2021-06-25 11:22:55 +02:00
Tobias Koppers 629f9f031c add support for module externals and automatic externals 2021-06-24 16:44:14 +02:00
Tobias Koppers 15408018cb partially fix test cases 2021-06-24 10:05:37 +02:00
dnalborczyk da6fe93982 Update lib/node/NodeTargetPlugin.js
Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
2021-06-18 11:01:13 +02:00
Daniel Nalborczyk b80b612c14 feat: add node: prefixed modules 2021-06-18 11:00:26 +02:00
Tobias Koppers fbcc470bcf add fsStartTime for single runs 2021-05-21 08:06:46 +02:00
Tobias Koppers 0d4dbd019a fix collecting of changed files and aggregating when suspending 2021-05-18 14:23:33 +02:00
Tobias Koppers f8fdc19c71 add pnpapi as builtin
fixes https://github.com/webpack/enhanced-resolve/pull/286
2021-04-19 10:30:51 +02:00
Tobias Koppers 2df8267220 handle falsy entry options correctly 2021-04-14 20:21:17 +02:00
Tobias Koppers d808d04d26 attach the chunk graph to RuntimeModules 2021-04-14 12:26:35 +02:00
Tobias Koppers 4e117781e8 improvements
add appendOnly flag
add custom console
add custom stream
2021-04-06 15:20:27 +02:00
Hyeonmin Park 72ba68cc78 feat: add colors flag to infrastructureLogging 2021-04-04 14:28:31 +09:00
Tobias Koppers 7dc945f147 allow to place runtime outside of the output path 2021-03-16 13:07:58 +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 8ea0a6ad4e
Merge pull request #12831 from animecyc/bugfix/shared-plugin-runtime-bug
fix: use runtime globals in shared plugin
2021-03-11 19:30:05 +01:00
Tobias Koppers cf208782e6 fix web worker chunk loadign for non-js chunks 2021-03-11 18:32:44 +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 1ebc7ca974 fix some incorrect properties accesses
fix some edge cases with MultiCompiler

fixes #12770
2021-02-24 20:12:32 +01:00
Daniel Nalborczyk bd5e4ddfa2 chore: move word to cspell.json 2021-02-15 23:21:04 -05:00
Tobias Koppers 263c950952 typings has been fixed 2021-01-04 12:04:42 +01:00
Daniel Nalborczyk 16833c33a0 fix spell checker (wasi) 2020-12-14 13:30:18 -05:00
Daniel Nalborczyk 56f42f13a0 feat: add support for additional node.js builtin modules 2020-12-14 13:17:39 -05: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 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 aa67a435a4 refactor wasm loading from target into output.wasmLoading option
allow entry specific wasm loading
2020-09-09 11:20:37 +02: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 7381cc0536 move baseUri into chunk loading runtime modules 2020-08-29 01:59:39 +02:00
Tobias Koppers 07d863e14c implement enabledChunkLoadingTypes approach
allow chunkLoading per entry
allow custom library/chunkLoading types
2020-08-28 10:59:37 +02:00
Tobias Koppers 3ec865d3e2 move StartupChunkDependenciesPlugin into chunk loading plugins 2020-08-28 10:58:05 +02:00
Tobias Koppers d69fadf8e8 add output.chunkLoading option to control chunk loading plugins 2020-08-28 10:58:04 +02:00
Tobias Koppers 23d230bdf9 move chunk loading into separate plugins 2020-08-28 10:58:03 +02:00
Tobias Koppers 6ac97b3f58 move CommonJsChunkFormat into separate plugin 2020-08-28 10:58:02 +02:00
Tobias Koppers afa9784dfc use hard-coded list of builtins to be independent of node.js version 2020-08-28 01:09:12 +02:00
DraggonFantasy 61a6470ec7 Fix formatting 2020-08-26 00:53:33 +03:00
DraggonFantasy 251885756e Fix formatting 2020-08-26 00:37:45 +03:00
DraggonFantasy 88b1b17425 Fix "ModuleNotFound 'module'" error
Related to #6497
2020-08-25 23:16:50 +03:00
Tobias Koppers 0a6f2bf401 expose missing target plugins 2020-08-19 23:17:33 +02:00
Ivan Kopeykin 8cf511dc94 Merge branch 'master' into chore/todos-to-defined-types 2020-08-06 22:48:20 +03:00
Tobias Koppers 305dab3ae1 improve and fix backtracing to root folder from nested directories 2020-08-04 09:36:49 +02:00
Ivan Kopeykin 4fc44a3398 add more types 2020-08-02 23:47:54 +03:00
Tobias Koppers 8948263db8 avoid using getChunkModuleMaps as it doesn't support different modules per runtime 2020-07-28 17:16:32 +02:00
Tobias Koppers 6c425546df Avoid using real watchers in MultiWatching test case
add watchFileSystem to MultiCompiler and typings
2020-07-08 11:17:00 +02:00
Tobias Koppers 9f28e37969 allow runtimeChunk with node targets
also fixes a incorrect relative path
2020-06-29 11:46:16 +02:00
Mohsen Azimi 042b4ee7d4 Use @ts-expext-error 2020-05-12 14:34:29 +02:00
Tobias Koppers b9c50fdb09 fix jsdoc documentations 2020-04-28 19:42:58 +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 2350d09680 move chunk filename template logic into reusable function 2020-01-16 15:40:44 +01:00
Yury Michurin 553638dcd1 Use chunkGraph API directly 2019-12-19 12:13:42 +02:00
Yury Michurin bd07e67a6a Fix quote 2019-12-19 12:03:49 +02:00