Commit Graph

498 Commits

Author SHA1 Message Date
Tobias Koppers 013ca3bdd7 add commonjsMagicComments options
move javascript related options from 'module' to 'module.parser.javascript'
2021-01-20 20:19:49 +01:00
Tobias Koppers 5643e4b8a6 adjust timestamps when timestamp origin differ between process.hrtime and node.js inspector 2021-01-20 20:18:58 +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 1e988a109b Merge branch 'master' into feat/issue_11571 2021-01-18 16:54:26 +01:00
David Houweling e04219d048 chore: add typings for DefaultStatsFactoryPlugin, Stats, and MultiStats 2021-01-17 15:18:38 +11:00
Tobias Koppers e475ec3fb0
Merge pull request #12429 from webpack/feature/resolve-in-externals 2021-01-15 16:07:15 +01:00
Tobias Koppers b6e349b018 offer getResolve to externals
improve types of externals configuration option
support promises in externals
2021-01-15 13:55:37 +01:00
Jaiwanth 8569b154b5 Added chunkModulesSpace to schema 2021-01-14 13:06:33 +05:30
Tobias Koppers a945a9b62c use typescript 4.2 2021-01-13 21:40:39 +01:00
Tobias Koppers a2e326129c make filesystem types compatible with memfs and normal fs
fixes #12400
2021-01-13 10:14:58 +01:00
Tobias Koppers d2b9e69656
Merge pull request #12384 from Dico200/patch-1
Fix runtime type error in WatchIgnorePlugin
2021-01-12 08:12:05 +01:00
Tobias Koppers 58984b77cb update type annotations 2021-01-11 22:15:31 +01:00
Tobias Koppers 32cea584b4 add resolve.preferAbsolute option 2021-01-11 16:38:15 +01:00
Tobias Koppers 87a0eef85c separate index signatures from properties to generate valid typescript 2021-01-08 21:35:44 +01:00
Tobias Koppers 09862aacf8 add warning when invalid dependencies are reported by loaders/plugins
add automatic workaround for invalid dependencies

#12340
#12283
2021-01-07 13:31:16 +01:00
Tobias Koppers dcf6449393 allow function for externals.byLayer 2021-01-06 11:14:23 +01:00
Tobias Koppers 10aa3daede add experiments.layers
add layers to define different module layers
support module layers in stats

add layer support for NormalModules

fixes #11466
2021-01-05 20:50:59 +01:00
Tobias Koppers aac7f2e619 allow to configure parsers and generators globally
get plugin schemas from root schema
normalize module.parser/generator
add test case
2021-01-05 12:08:30 +01:00
Tobias Koppers 6764e0694c
Merge pull request #12284 from jaiwanth-v/add-nestedModulesSpace-to-schema
Added nestedModulesSpace to schema and updated the types
2021-01-05 10:38:17 +01:00
Tobias Koppers cd70878036 update description 2021-01-04 15:43:47 +01:00
Tobias Koppers 4d1f65906a update types because of updated tooling 2021-01-04 12:07:34 +01:00
Jaiwanth ee1fcf1255 Added nestedModulesSpace to schema and updated the types 2020-12-29 22:08:49 +05:30
Tobias Koppers 07fc323684 ignore cloned ExportInfo during hashing 2020-12-23 20:39:54 +01:00
Tobias Koppers 284eb60fc0 fix typings for `object` arguments 2020-12-18 13:52:27 +01:00
Tobias Koppers b5b1f25ad2 improve typings for stats related hooks and classes 2020-12-17 18:51:55 +01:00
Tobias Koppers ed4694dd9b
Merge pull request #12225 from webpack/bugfix/undefined-conditions
treat `undefined` equal to not existing in rules
2020-12-17 13:31:36 +01:00
Tobias Koppers 8acebd2ff5 treat `undefined` equal to not existing in rules
both are treated as empty string
2020-12-17 11:20:11 +01:00
Tobias Koppers 16d5c35b1e reexport the schema validation function from schema-utils 2020-12-17 10:41:28 +01:00
Tobias Koppers 359b327f34 add missing argument to SourceMapSource 2020-12-17 10:27:18 +01:00
Tobias Koppers 745a583040 export WebpackError 2020-12-17 10:27:18 +01:00
Tobias Koppers 63dda151a2 expose Asset and AssetInfo types
allow custom properties in AssetInfo
2020-12-17 10:27:18 +01:00
Tobias Koppers c24091f54d matched value can be undefined in function rule condition 2020-12-16 18:29:36 +01:00
Tobias Koppers 4c288fead3 compile typings in strict mode to include undefined and null in types 2020-12-16 18:28:49 +01:00
Tobias Koppers 9563338d90 improve reading of cache file 2020-12-14 13:16:20 +01:00
Tobias Koppers 005bdbbefd fix memory leak when using createReadStream 2020-12-14 11:06:15 +01:00
Tobias Koppers c6311bae62 allow bigger cache sizes 2020-12-14 08:16:08 +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 f76aa61d34 use simple output.pathinfo mode by default
cache simple pathinfo transformation in memory
2020-12-04 17:06:37 +01:00
Tobias Koppers 7cc206974c upgrade typescript major version 2020-11-30 08:42:35 +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 ccfe01aab4 allow to process assets that are added during processAssets
fix and add processAsset stages

allow to hook into RealContentHashPlugin for custom hashing
2020-11-26 14:00:21 +01:00
Tobias Koppers eb5481adfb
Merge pull request #11948 from jantimon/fix/plugin-types
fixes "Type '(compiler: Compiler) => void' is not assignable to type '() => void'.ts"
2020-11-26 13:56:41 +01:00
Tobias Koppers 35363408c6 fix newly found eslint problems 2020-11-26 11:13:17 +01:00
Tobias Koppers 30b7137064 update dev dependencies
fix bug with optional types in typings
2020-11-26 10:48:16 +01:00
Tobias Koppers dbea79cf8a improve code and test case 2020-11-25 22:48:11 +01:00
Tobias Koppers f32762ed69 fix #11990 2020-11-16 11:53:19 +01:00
Hiroki Osame 1422f2400d docs(type): documented minimized property on asset-info 2020-11-11 01:15:35 -05:00
Jan Nicklas d12b043c3d fix: adjust typings to resolve "Type '(compiler: Compiler) => void' is not assignable to type '() => void'.ts 2020-11-09 14:54:40 +01:00
Tobias Koppers 48150a062e update types 2020-11-03 15:35:43 +01:00
Tobias Koppers 18495151b8 handle the case when execution order in a concatenated module is runtime-dependent
fix #11863
2020-10-29 17:53:56 +01:00
Tobias Koppers 6762521773 upgrade tooling for improved array types
fixes #11801
fixes #11850
2020-10-28 20:51:08 +01:00
Tobias Koppers e1b5a78a24 add optimization.sideEffects: "flag" and use this by default
analysing for side effects cause unnecessary changes in parent modules and we want to avoid that in development
2020-10-27 06:50:07 +01:00
Tobias Koppers 19f51535ca merge multiple import statements with different conditions correctly
improve hashing when conditional runtime evaluation is involved
add test cases
2020-10-27 06:48:54 +01:00
Tobias Koppers 7661ad868a generate code that executes depending on runtime
fixes #11770
2020-10-27 06:30:49 +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 22bc3dcdf2
Merge pull request #11771 from Cronus1007/master
followSymLinks Options Added with the snapshots and typings updated
2020-10-23 09:03:57 +02:00
Tobias Koppers 195a9408ff improve description 2020-10-22 18:58:14 +02:00
Cronus1007 7f76c2d722 followSymLinks Options Added with the snapshots and typings updated 2020-10-22 19:57:07 +05:30
Tobias Koppers 2ec90b3687 add asset info for `sourceFilename` and `javascriptModule` 2020-10-22 10:47:23 +02:00
Tobias Koppers 9342540a1f
Merge pull request #11721 from webpack/bugfix/asset-processing-order
fix order of asset optimization to fix conflict between compression-plugin and real hash plugin
2020-10-16 15:34:58 +02:00
Tobias Koppers 204caeee05 fix order of asset optimization to fix conflict between compression-plugin and real hash plugin 2020-10-16 14:42:46 +02:00
Tobias Koppers 0fe03c7af0 fix unused modules in chunk when optimizing runtime-specific
fixes #11673
2020-10-16 11:47:33 +02:00
Tobias Koppers 2888c8a406
Revert "fix unused modules in chunk when optimizing runtime-specific " 2020-10-15 20:17:26 +02:00
Tobias Koppers b1a11fc6b6
Merge pull request #11706 from liximomo/fix-api
fix: reorder params
2020-10-15 20:14:00 +02:00
liximomo 7d3008d5c6 fix: fix lint 2020-10-16 00:35:13 +08:00
Tobias Koppers 50c3a83340 fix unused modules in chunk when optimizing runtime-specific
fixes #11673
2020-10-15 10:18:41 +02:00
Tobias Koppers 0e2f3fbf5c
Merge pull request #11645 from wood1986/features/expose-entry-fn
fix: expose EntryPlugin creation
2020-10-13 14:25:45 +02:00
Tobias Koppers 65eca2e529 expose webpack from Compiler
fix some jsdoc descriptions
2020-10-12 20:16:58 +02:00
Tobias Koppers d870365d94 fix incorrect type 2020-10-12 09:45:19 +02:00
Tobias Koppers 3be5a9f2d9 expose DynamicEntryPlugin 2020-10-12 09:39:43 +02:00
Tobias Koppers 87c85e3fa3 cleanup, expose plugin class 2020-10-12 09:37:07 +02:00
xiaoxiaojx f25b09f783 feat: libraryTarget add assign-properties 2020-10-11 04:49:40 +08:00
Nitin Kumar 37c495c7ab export type RuleSetUseItem 2020-10-08 14:22:59 +05:30
Nitin Kumar 39faf34083 export type RuleSetUse 2020-10-08 14:09:05 +05:30
Nitin Kumar e5fd246353 export type RuleSetConditionAbsolute 2020-10-08 14:07:46 +05:30
Nitin Kumar 660baadbab export RuleSetCondition types 2020-10-08 14:05:58 +05:30
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
Tobias Koppers 3390ab4c32 update enhanced-resolve and loader-runner for fragment escaping support
add fragment escaping support

fixes #11555
2020-09-30 10:22:26 +02:00
Tobias Koppers 68f0dbe748 allow plugins to modify the default size types for splitChunks 2020-09-29 14:34:59 +02:00
Tobias Koppers 4ea79e0683 update enhanced-resolve and webpack-sources
add resolve.preferRelative
set preferRelative for new URL() and new Worker() to fix relative requests
2020-09-28 20:43:03 +02: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
Aaron Tribou 0cf554f537
Merge branch 'master' into bugfix/accept-ignored-regex 2020-09-26 10:16:46 -05:00
Tobias Koppers ef9e623559
Merge pull request #11530 from webpack/feature/chunk-filename-function
output.chunkFilename can be a function
2020-09-25 19:47:42 +02:00
Tobias Koppers b8950e8581 output.chunkFilename can be a function 2020-09-25 16:03:05 +02:00
Tobias Koppers f2f0ea37f0
Merge pull request #11493 from rishabh3112/patch-1
feat: add watching property to compiler
2020-09-25 13:41:24 +02:00
Tobias Koppers 963d67178c expose classes needed to create a custom module type 2020-09-25 10:53:14 +02:00
Aaron Tribou e7bf987114
Check-in updates from special-lint-fix 2020-09-20 20:44:46 -05:00
Tobias Koppers ea075be453 add config.ignoreWarnings
deprecate stats.warningsFilter
2020-09-20 22:08:38 +02:00
Tobias Koppers 07fc554bef improve warnings and errors handling in stats
respect warningsFilter for warnings count
include child compilation warnings and errors in count
show hint for child compilation errors and warnings
2020-09-20 21:24:15 +02:00
Rishabh Chawla d23821ac70 chore: update types 2020-09-19 10:00:04 +05:30
Tobias Koppers f263359fd8 use output.importMetaName for import.meta 2020-09-18 10:55:37 +02:00
Tobias Koppers 4dc04d1971 Merge branch 'master' into dynamically-resolve-public-path 2020-09-18 10:40:39 +02:00
Tobias Koppers a8542d3317 fix circular references between containers and modules in containers 2020-09-17 10:44:52 +02:00
Ivan Kopeykin 49009486df support undo path 2020-09-16 23:20:44 +03:00
Tobias Koppers 96383923c8
Merge pull request #11478 from webpack/deps/enhanced-resolve
update enhanced-resolve
2020-09-16 08:38:14 +02:00
Tobias Koppers aadc15e740 update enhanced-resolve for
- imports field support
- resolve.fallback option

recommend resolve.fallback for polyfills
2020-09-16 07:28:32 +02:00
Tobias Koppers 3059c28a12
Merge pull request #11476 from webpack/error/mjs-extension
add breaking change info for fullySpecified resolving
2020-09-15 22:00:37 +02:00
Tobias Koppers 3d8f130ee3 add breaking change info for fullySpecified resolving
#11467
2020-09-15 15:12:15 +02:00
Tobias Koppers eddd3206dc add raw export for named reexport from non-harmony 2020-09-15 12:36:29 +02:00
Tobias Koppers 9af66ff9af revert to registering the namespace export because we need to know this early 2020-09-15 12:36:16 +02:00
Tobias Koppers 39e1a7e4c7 move magic names to constants in ConcatenationScope
improve types
2020-09-15 12:36:06 +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 91cc17b438 register exports in DependencyTemplates 2020-09-15 12:35:38 +02:00
Tobias Koppers fdd4a7713f add ConcatenationScope 2020-09-15 12:34:50 +02:00
Tobias Koppers 2c00413b26 rename supportsAsyncImport -> supportsDynamicImport 2020-09-11 23:13:10 +02:00
Tobias Koppers bbdb33a5cf rename output.environment.import -> output.environment.dynamicImport 2020-09-11 23:11:02 +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 48010fb955 replace output.ecmaVersion with output.environment and more detailed flags 2020-09-10 11:12:28 +02:00
Tobias Koppers 730aefef37
Merge pull request #11412 from webpack/experiments/enable-mjs
enable mjs experiment
2020-09-10 10:57:36 +02:00
Tobias Koppers 817c1bf9c7 move default externals from target into externalsPresets option 2020-09-09 15:18:59 +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 2d4c9da6a6 enable mjs experiment 2020-09-07 23:15:24 +02:00
Tobias Koppers 0afc6a7f48 print entrypoint only when necessary (stats.entrypoints: "auto")
show sizes for entrypoints
2020-09-03 23:29:14 +02:00
Tobias Koppers 8e0c511068 replace hash, version, time and builtAt with build summary at the bottom 2020-09-03 22:12:52 +02:00
Tobias Koppers 8497cd34c6 move start and endTime from Stats to Compilation 2020-09-03 22:01:25 +02:00
Tobias Koppers ce97f40bb7 update test case for changed stats format
fix bug with groupModulesByType flag
rename stats.runtime to stats.runtimeModules
2020-09-02 10:51:10 +02:00
Tobias Koppers 5282f878a1 fix groupModulesByAttributes description 2020-09-01 20:52:36 +02:00
Tobias Koppers 8904dd7b91 rename groupAssetsByStatus to groupAssetsByEmitStatus 2020-09-01 20:52:34 +02:00
Tobias Koppers be021e00f4 add grouping of modules 2020-09-01 18:31:22 +02:00
Tobias Koppers 3ea9400505 add grouping of assets 2020-09-01 18:16:43 +02:00
Tobias Koppers bdeea6ec2f
Merge pull request #11395 from webpack/refactor/asi
refactor how asi handled
2020-09-01 15:47:41 +02:00
Tobias Koppers 962199c288 nitpicks 2020-09-01 11:15:52 +02:00
Tobias Koppers 7381cc0536 move baseUri into chunk loading runtime modules 2020-08-29 01:59:39 +02:00
Tobias Koppers 312e2ab587 Merge branch 'master' into feature/asset-url 2020-08-28 20:54:50 +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 a7e86c791c remove chunkCallbackName, update snapshots 2020-08-28 10:59:40 +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 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 805d26b0ae unify config options for jsonpFunction and chunkLoadFunction to chunkLoadingGlobal
rename hotUpdateFunction to hotUpdateGlobal
2020-08-28 10:58:00 +02:00
Tobias Koppers c0249af6d1
Merge pull request #11370 from webpack/feature/javascript-parser-improvement
use bitmask instead of array+set in getMemberExpressionInfo
2020-08-28 10:08:22 +02:00
Tobias Koppers 49d9ec5625 cleanup public api and expose JavascriptParser 2020-08-28 01:46:14 +02:00
Tobias Koppers e23bc8ca7c use expression hook for metaProperty
a MetaProperty is an Expression
it's more consistent
2020-08-27 13:03:56 +02:00
Ivan Kopeykin 1556341c13 fix #11310 2020-08-27 12:59:28 +02:00
Tobias Koppers d6e637f33c add "snapshot" configuration to allow to configure how snapshots are created
expose snapshot options for module, resolve, buildDependencies and resolveBuildDependencies
move managedPaths and immutablePaths from config.cache to config.snapshot
add timestamp + hash snapshotting mode
use timestamp + hash mode by default in production and for buildDependencies
2020-08-26 01:27:13 +02:00
Ivan Kopeykin 434c446d91 use bitmask instead of array+set in getMemberExpressionInfo 2020-08-24 22:00:08 +03:00
Tobias Koppers a4a5a76703 make original source in CachedSource lazy 2020-08-24 18:16:56 +02:00
Tobias Koppers cee47dc867 Store cache dependencies inside of Snapshot to reduce cache size 2020-08-24 18:16:54 +02:00
Tobias Koppers 76a6e9b90f create a class for Snapshot for faster access and smaller serialization 2020-08-24 18:16:53 +02:00
Tobias Koppers 6409463d24 only create shared snapshots for 3 or more shared entries
add logging
2020-08-24 18:16:50 +02:00
Tobias Koppers 49a28a73cf accept Source-like objects in assets and cache sources for RealContentHashPlugin 2020-08-20 09:54:59 +02:00
Tobias Koppers 0a6f2bf401 expose missing target plugins 2020-08-19 23:17:33 +02:00
Tobias Koppers 2a45cf758e export webpack-sources 2020-08-19 20:06:05 +02:00
Tobias Koppers 709e3f1788 remove unused code 2020-08-19 15:08:34 +02:00
Tobias Koppers db36afea4d
Merge pull request #11333 from chenxsan/feature/output-charset
add output.charset option
2020-08-19 15:01:06 +02:00
Tobias Koppers 48ff7043f1 add provide and mergeEtags to CacheFacade 2020-08-19 11:25:24 +02:00
Tobias Koppers b929d4cdce calculate real content hash for assets after asset processing 2020-08-18 22:07:24 +02:00
Tobias Koppers 71cf7f4dc8 add support for reexporting in CommonJS
and necessary refactoring + fixes for that
2020-08-17 21:32:47 +02:00
chenxsan 509349f7d1 fix lint 2020-08-17 21:44:32 +08:00
chenxsan 2611eb8ccc update schemas 2020-08-17 20:34:23 +08:00
Ivan Kopeykin 4157166263 Merge branch 'master' into feature/asset-url
# Conflicts:
#	test/Defaults.unittest.js
2020-08-16 15:47:05 +03:00
Ivan Kopeykin f659974405 add output.baseURI option, add test case for it 2020-08-16 12:34:40 +03:00
Tobias Koppers 3cf8299602 add test case for conflicting named with namespace reexport
and fix problem
2020-08-13 10:59:56 +02:00
Tobias Koppers 8b91b6c508 use target info to implement side effects plugin 2020-08-12 23:20:45 +02:00
Tobias Koppers 9b80cde76c store multiple targets per ExportInfo
resolve target when reading
2020-08-12 21:41:03 +02:00
Tobias Koppers 163e7674a0 track the target binding of harmony reexports
display target binding in module info header
check conflicting star exports (fixes #7562) when statically known
2020-08-11 20:13:01 +02:00
Tobias Koppers d95fa3da6d need to check dependency when applying loaders for normal imports 2020-08-08 11:29:09 +02:00
Tobias Koppers fcf2647019
Merge pull request #11257 from webpack/chore/todos-to-defined-types
add more types
2020-08-07 19:29:32 +02:00
Tobias Koppers 792ce1d6a6
Merge pull request #11221 from webpack/feature/optional-chaining
Feature/optional chaining
2020-08-07 19:24:01 +02:00
Ivan Kopeykin 18ae4d16d8 add evaluation to optional chaining 2020-08-07 14:43:40 +02:00
Ivan Kopeykin dfdc554b80 add optional chaining support 2020-08-07 14:43:39 +02:00
Ivan Kopeykin 8cf511dc94 Merge branch 'master' into chore/todos-to-defined-types 2020-08-06 22:48:20 +03:00
Ivan Kopeykin 65bed95efe pass dependencyType directly to ruleset 2020-08-06 21:34:47 +03:00
Tobias Koppers 84aeac5c92 add Compilation.deleteAsset 2020-08-06 09:55:18 +02:00
Ivan Kopeykin fcac182805 match dependency with Rule 2020-08-06 02:08:06 +03:00
Ivan Kopeykin ddc83b0d70 feat: url assets 2020-08-05 00:55:38 +03:00
Tobias Koppers 1273b9eb96
Merge pull request #11267 from webpack/experiments/import-async
enable experiments.importAsync by default
2020-08-04 16:00:00 +02:00
Tobias Koppers dfc8e35f2d enable experiments.importAsync by default
remove experiments.importAwait
2020-08-04 00:47:08 +02:00
Nitin Kumar ddaa68e198 fix: optimization.emitOnErrors description 2020-08-03 15:11:54 +05:30
Ivan Kopeykin 4fc44a3398 add more types 2020-08-02 23:47:54 +03:00
Tobias Koppers d0ef2ce43f display assets in stats in a list instead of a table
group related assets below the parent asset
2020-08-02 08:07:32 +02:00
Tobias Koppers f5bd6216aa add related info to asset info 2020-08-02 07:36:05 +02:00
Tobias Koppers ca369f23c5 do cache related tasks after calling handler in watching
improve progress output
2020-08-01 09:00:17 +02:00
Tobias Koppers 4c3216efad add size optimization mode to `optimization.mangleExports` 2020-07-31 12:54:38 +02:00
Tobias Koppers a4f17775b1 fix dependOn behavior with runtimes, fix runtime passing by entry 2020-07-30 11:18:09 +02:00
Tobias Koppers 77cdce7393 remove unused methods, improve code coverage 2020-07-29 11:14:26 +02: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 1265765141 polish, types 2020-07-27 22:41:04 +02:00
Tobias Koppers e16bdfda6c refactor used exports analysis, hashing, code generation, optimizations
to keep track of runtimes, used exports depending on runtime

modules can have different hashes and generated code depending on runtime
chunks are only considered as equal for MergeDuplicateChunks and SplitChunks when exports used in contained modules are equal
added `optimization.usedExports: "global"` to opt-out from used exports analysis per runtime
added `splitChunks.usedExports` and `splitChunks.cacheGroups[x].usedExports` to enable/disable used exports comparing for modules
`splitChunks.usedExports` defaults to `true` in production
2020-07-27 22:40:44 +02:00
Tobias Koppers b3466e996b add entry[x].runtime option to allow runtime chunk per entry 2020-07-27 22:40:40 +02:00
Ivan Kopeykin 60619d2a41 fix lint 2020-07-22 23:05:26 +03:00
Ivan Kopeykin bd858f0d30 add more types 2020-07-22 19:58:08 +03:00
Tobias Koppers c8aff62228 improve handling of side effects with evaluation 2020-07-21 13:00:25 +02:00
Tobias Koppers bc1c5a8f23 refactor evaluation logic 2020-07-21 10:30:12 +02:00
Ivan Kopeykin 5ec7dfd6ac refactor equality comparison, support nullish coalescing in ConstPlugin
- add handleStrictEqualityComparison callback
- add handleAbstractEqualityComparison callback
- rework evaluateIdentifier interface
- add tests
2020-07-21 10:30:10 +02:00
Ivan Kopeykin 3ecc87889c add nullish coalescing support 2020-07-21 10:30:08 +02:00
Tobias Koppers 1179a3eaab
Merge pull request #11188 from webpack/feature/mjs
improve compatibly with node.js ESM
2020-07-20 12:18:21 +02:00
Tobias Koppers 4786a7ec61
Merge pull request #11191 from webpack/bugfix/asset-hash
use content hashes for assets
2020-07-20 10:18:54 +02:00
Tobias Koppers 36cf3039aa use content hashes for assets 2020-07-20 08:45:27 +02:00
Tobias Koppers f65adade96 deprecate optimization.noEmitOnErrors in favor of optimization.emitOnErrors 2020-07-20 08:40:31 +02:00
Tobias Koppers 205bbb4c0d improve compatibly with node.js ESM
improve experiments.mjs to be more compatibly with node.js ESM
  - add support for `type: "module"` in package.json
  - add support for `*.cjs`
  - enable strict ESM for data uris with `text/javascript` or `application/javascript`
  - disallow not fully specified requests in imports `*.mjs` or `type: "module"`

add `descriptionData` rule condition to match package.json info
fix passing resolveOptions along context modules
2020-07-17 13:58:29 +02:00
Tobias Koppers 8c00696660
Merge pull request #11177 from webpack/bugfix/watching-invalid
call invalid hook also when manually invalidating watching
2020-07-16 08:13:11 +02:00
Tobias Koppers 5a2fa99055 call invalid hook also when manually invalidating watching 2020-07-15 19:34:23 +02:00
Tobias Koppers b1eac4ab29 Use computed resolve options in context alternatives
deprecate ContextModuleFactory.hooks.alternatives because we need the options in the hook
2020-07-15 14:13:35 +02:00
Tobias Koppers 0d857e3942 Improve cleverMerge to respect byDependency order correctly
Allow to use "..." in `option.resolve` too
Add "..." to schema when needed

Apply dependency specific mainFields, aliasFields and conditionNames only
for cjs and esm dependencies or when none is specified for backward-compat.
2020-07-15 14:13:31 +02:00
Tobias Koppers fd9b399ae9 Create Cache facade to make it easier to use
add missing serializers for classes used in test suite
2020-07-15 11:14:28 +02:00
Tobias Koppers 6014ca7e86 splitChunks improvements
add new splitChunks.enforceSizeThreshold option
enforces splitting on certain size (ignoring maxRequests and minRemainingSize)

reduce default for splitChunks.minSize to 20k
set default for splitChunks.enforceSizeThreshold to 50k

fix bug where sorting didn't work for minSize: 0
2020-07-13 10:12:17 +02:00
Tobias Koppers 3d36f75f88
Merge pull request #11143 from vankop/add-roots
add roots option
2020-07-09 13:15:30 +02:00
Tobias Koppers 49e5ce2812
Merge pull request #11131 from webpack/bugfix/ignore-linking-errors-on-error
ignore linking errors when the imported module has errors
2020-07-09 10:22:35 +02:00
Tobias Koppers f874ac290d
Merge pull request #11140 from webpack/bugfix/avoid-modify-hash
fix HMR bugs with hashing
2020-07-09 10:06:49 +02:00
Tobias Koppers 71ec6adf3b Improve description in config schema 2020-07-09 09:41:31 +02:00
Tobias Koppers 555db6a547 remove Compilation.modifyHash
refactor HMR Plugin to better support module hashes

fixes bug that causes empty HMR manifest
remove HotModuleReplacementPlugin multiStep
2020-07-09 09:02:38 +02:00
Ivan Kopeykin 38779b85ee add roots option 2020-07-09 00:17:57 +03:00
Tobias Koppers 392ff5cf76
Merge pull request #11136 from webpack/improvement/exports-type-unknown
Avoid tracking/printing detailed usage info for modules without exportsType
2020-07-08 18:25:34 +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 5068909499 Avoid tracking/printing detailed usage info for modules without exportsType
Make ContextModule a static default exporting module
fix provided exports info for ExternalModule
2020-07-08 11:07:03 +02:00
Tobias Koppers 78920aa689 ignore linking errors when the imported module has errors 2020-07-07 17:54:15 +02:00
Tobias Koppers e27eb830f7
Merge pull request #11105 from webpack/mf/semver
add full Semantic Versioning for Shared Modules
2020-07-06 23:18:00 +02:00
Tobias Koppers e8ed3d8d3b
Merge pull request #11117 from vankop/add-export-as-from
add export * as namespace from "module"
2020-07-06 22:31:07 +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 7bbc2aa3ce split HttpUrlPlugin into two plugins for http and https 2020-07-06 17:45:45 +02:00
Tobias Koppers 85edc5c7fa improve code design of ImportMetaPlugin
add missing evaluation for compare operations
refactor duplicate code

add unhandledExpressionMemberChain hook to parser
add evaluateToNumber and types to JavascriptParserHelpers
add undefined to BasicEvaluatedExpression

add import.meta.webpack as webpack major version
2020-07-06 17:13:09 +02:00
Tobias Koppers 7442a211b9 add support for resource fragments 2020-07-03 17:03:15 +02:00
Tobias Koppers 7dad1c1c30 refactor scheme handling into plugins 2020-07-03 17:01:02 +02:00
Ivan Kopeykin 85715ba2c9 add export * as namespace from "module" 2020-07-03 13:12:58 +03: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 3fcd5f9bc5 add full Semantic Versioning for Shared Modules
change storage format in the share scope
choose shared module deterministic from the same origin
remove array syntax from version and requiredVersion in schema
2020-07-02 16:09:39 +02:00
Tobias Koppers 23f922bed3 make bundles with Module Federation more stable 2020-07-02 15:28:17 +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
Ivan Kopeykin 89abab2631 add absolute url specifier support 2020-06-26 22:16:27 +03:00
Tobias Koppers b30b9681fa opt-out from unsafe caching when providing shared module as side-effect 2020-06-24 23:06:36 +02:00
Sergey Melyukov 139da61b5f rename jsonScriptType to scriptType 2020-06-24 23:05:21 +03:00
Ivan Kopeykin de18533373 update import.meta
- add evaluation to import.meta and import.meta.url
- bare import.meta is disallowed
2020-06-24 22:47:43 +03:00
Tobias Koppers ba9027ac1a
Merge pull request #10719 from goganchic/feature/data-uri
Implement Data URI imports
2020-06-24 11:08:44 +02:00
Ivan Kopeykin 1beb4e5707 support import.meta 2020-06-23 01:03:52 +03:00
Tobias Koppers 83495dc3aa update typings 2020-06-18 00:26:35 +02:00
Tobias Koppers 0397701d85 improve types, moved byDependency logic into ResolverFactory 2020-06-17 22:17:14 +02:00
Ivan Kopeykin bfd447be01 upgrade tapable 2020-06-17 16:53:14 +03:00
Ivan Kopeykin 8174145782 upgrade enhanced-resolve 2020-06-17 14:22:37 +03:00
Ivan Kopeykin e58c64912b fix lint 2020-06-16 22:09:07 +03:00
Ivan Kopeykin 9061a5ca94 add RESOLVE_OPTIONS to resolveMatchedConfigs 2020-06-16 21:20:46 +03:00
Ivan Kopeykin 198e51a485 Merge branch 'master' into exports-field
# Conflicts:
#	lib/dependencies/ImportDependency.js
#	lib/sharing/ConsumeSharedPlugin.js
#	lib/sharing/ProvideSharedPlugin.js
#	types.d.ts
2020-06-16 21:16:41 +03:00
Tobias Koppers c00fec3aa7
Merge pull request #10964 from pushkar100/feature/lazy-load-named-exports
Lazy loading only required exports from dynamic import()
2020-06-16 15:04:06 +02:00
Tobias Koppers d16f581d79
Merge pull request #11003 from resistdesign/patch-1
chore(Compilation EntryData includeDependencies):
2020-06-16 15:03:28 +02:00
Tobias Koppers ad56d8abb1 improve handling of relative/absolute requests in the ProvideSharedPlugin 2020-06-15 16:20:34 +02:00
Ryan Graff 9160a0d3fd chore(Compilation EntryData includeDependencies):
Update typings.
2020-06-13 18:05:35 -04:00
Tobias Koppers 1c42f71250 allow to provide and consume multiple versions of shared modules 2020-06-13 14:45:37 +02:00
Tobias Koppers dc37d6910a add finishMake hook to Compiler 2020-06-10 16:28:59 +02:00
Tobias Koppers a4ac8f0328 Cleanup 2020-06-10 14:01:24 +02: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
Ivan Kopeykin 2f7510abd2 add restrictions option 2020-06-08 23:54:59 +03:00
Pushkar DK 31e3369a73 Add 'webpackExports' & make only referenced exports available in import() 2020-06-06 00:11:21 +05:30
goganchic 0ab91b7664 fix mimetype type description 2020-06-05 15:32:43 +03:00
goganchic 4b59a302a2 add mimetype rule 2020-06-05 15:15:11 +03:00
Tobias Koppers 3df380e2d7 add script external
change defaults of ModuleFederationPlugin to var library and script remoteType
allow using empty entry in config
2020-06-04 03:18:07 +02:00