Commit Graph

260 Commits

Author SHA1 Message Date
Tobias Koppers 565724a045 type fixes 2020-07-15 14:13:33 +02:00
Tobias Koppers d9435e0e3e
Merge pull request #11075 from vankop/import-meta
add import.meta support
2020-07-06 20:19:23 +02:00
Tobias Koppers 1bb02df61e
Merge pull request #11095 from vankop/support-url-requests
Support url requests
2020-07-06 20:03:52 +02:00
Tobias Koppers 7dad1c1c30 refactor scheme handling into plugins 2020-07-03 17:01:02 +02:00
Tobias Koppers 9f28e37969 allow runtimeChunk with node targets
also fixes a incorrect relative path
2020-06-29 11:46:16 +02:00
Ivan Kopeykin 1beb4e5707 support import.meta 2020-06-23 01:03:52 +03:00
Tobias Koppers 0397701d85 improve types, moved byDependency logic into ResolverFactory 2020-06-17 22:17:14 +02:00
Ivan Kopeykin 3f8def8185 fix discussions
- add module condition
- rename EnhancedResolveOptions
- fix applyByDependency util function
- use EMPTY_RESOLVE_OPTIONS when resolveOptions are undefined
2020-06-16 21:02:31 +03:00
Ivan Kopeykin d2a08e3cc8 rework how byDependency applied
remove dependencyType parameter for resolver factory
add dependencyType option in enhanced resolve options
2020-06-09 01:32:24 +03:00
Tobias Koppers 707a103262 merge resolve.byDependency defaults with user provided values
allow to use resolve.byDependency in module.rules
2020-05-28 19:55:14 +02:00
Ivan Kopeykin 4af609a38c fix resource identifier in Compilation and resolveLoader options 2020-05-28 10:53:28 +03:00
Ivan Kopeykin d4b1819749 add ability to set resolve options per dependency category
- byDependency option
- create resolver per dependency category
2020-05-28 02:30:29 +03:00
Mohsen Azimi 728249fb59 add @ts-expect-error 2020-05-12 14:34:44 +02:00
Mohsen Azimi a86f5de1bd Update lib/WebpackOptionsApply.js
Co-Authored-By: Tobias Koppers <tobias.koppers@googlemail.com>
2020-05-12 14:34:40 +02:00
Mohsen Azimi 9775a4f5e3 Remove TODO comment 2020-05-12 14:34:36 +02:00
Mohsen Azimi 042b4ee7d4 Use @ts-expext-error 2020-05-12 14:34:29 +02:00
Tobias Koppers 3d2cc563dc report better error message when importAsync experiment is not enabled
#10788
2020-04-28 20:29:53 +02:00
Tobias Koppers f1dd328779 refactor library system 2020-02-26 17:35:52 +01:00
Tobias Koppers e5b51235d7 add externalsType option
fix a few edge cases in ExternalModule
2020-02-26 17:22:42 +01: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
lilililee 311f196219
refactor(target): remove unnecessary judgment
options.target must be string or function, otherwise will throw WebpackOptionsValidationError when run webpack(options) .
2019-12-30 16:12:59 +08:00
Tobias Koppers 6b9d510612 refactor chunk prefetching/preloading into separate plugin and runtime modules 2019-12-19 12:01:46 +01:00
Sergey Melyukov 9bca2286ed opt-out inner graph optimization when eval is used 2019-12-16 16:49:01 +03: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 cda629eaac add missing runtime requirement for async module header
active async modules when top level await is used
2019-11-19 13:11:23 +01:00
Kashyap 96ad1c65a6 fix: Remove minor typo in WebpackOptionsApply 2019-11-04 13:05:59 +05:30
evilebottnawi 8198ffb3e6 refactor: code 2019-10-22 00:14:05 +02:00
Tobias Koppers 87abd00c6e remove all options for cache.store expect "pack"
these are incomplete and may be readded later
2019-10-21 09:22:38 +02:00
Tobias Koppers dd2c4de1ce use SourceMapDevTool default 2019-10-18 15:09:34 +02:00
evilebottnawi c81ffbef42 refactor: `devtool` option 2019-10-18 14:43:21 +02:00
Tobias Koppers b05a76eaf4 lazy evaluate in WebpackOptionsApply 2019-10-09 13:44:39 +02: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 ccc53dba5e update deprecated usage in library-related plugins 2019-10-08 23:46:31 +02:00
Tobias Koppers 69a545c444 Deprecate MainTemplate, ChunkTemplate, ModuleTemplate
move logic and hooks to JavascriptModulesPlugin
2019-10-08 23:46:26 +02:00
Tobias Koppers 2e37731988 add analysis for top level symbols, exports and imports
integrates the work of Vincent Chan for GSoC 2018

Co-authored-by: Vincent Chan <cdzos97@gmail.com>
2019-09-03 14:18:40 +02:00
Tobias Koppers 31b869616e
Merge pull request #9620 from webpack/feature/exports-info
add `__webpack_exports_info__` API to allow export introspection
2019-08-22 18:13:25 +02:00
Tobias Koppers fb13b76b34 add `__webpack_exports_info__` API to allow export introspection
improve usage/provide information for nested exports

improve tests for deep exports
2019-08-22 16:59:37 +02:00
Tobias Koppers a2caa36b8e add immutablePaths next to managedPaths for paths in the yarn cache
for PnP support
2019-08-20 14:50:07 +02:00
Tobias Koppers e5cecdad23 store build dependencies snapshot in pack
add snapshot shortcut for package manager managed paths
add cache.managedPaths
2019-08-13 17:02:37 +02:00
Tobias Koppers 856235d76f track and config build dependencies 2019-08-12 23:07:41 +02:00
Tobias Koppers f236df1bc9 replace logging in persistent caching with infrastructure logger
remove cache.loglevel
2019-08-12 13:41:23 +02:00
Tobias Koppers d2181eeffa pass missing idleTimeout options to CachePlugin 2019-07-26 13:59:15 +02:00
Tobias Koppers fb45e38fa4 rename url -> asset
remove experimental in favor of experiments.asset
2019-07-17 11:57:04 +02:00
Yuta Hiroto c9aa09439e fxiup! feedback 2019-07-17 11:47:14 +02:00
Yuta Hiroto ad51d66e95 feat(WebpackOptions): add default value and set UrlModulesPlugin
default: [hash].[ext]
2019-07-17 11:46:25 +02:00
Tobias Koppers b2e7837288 replace Object.assign with object spread 2019-06-19 13:16:05 +02:00
Tobias Koppers e9c0d068dd refactor filesystem interfaces
add Compiler.intermediateFileSystem
avoid using `path` and `fs` module when possible
move `join`, `mkdirp` and `dirname` into utils
join and dirname is optional in FileSystem interface
remove mkdirp from Filesystem interface
2019-06-11 17:32:58 +02:00
Tobias Koppers 12a3e7c854 create experiments for importAwait importAsync and (a)syncWebAssembly 2019-06-05 13:32:22 +02:00
Tobias Koppers faa56f1751 move plugin into folder 2019-06-05 12:07:20 +02:00
Tobias Koppers 1977cb1036 move async module flag to ModuleGraph 2019-06-05 11:15:25 +02:00