Commit Graph

802 Commits

Author SHA1 Message Date
Ivan Kopeykin eb5d124150 add "in" operator support 2022-03-02 15:01:35 +03:00
Ivan Kopeykin 005e065fc4 renaming 2022-02-28 22:52:16 +03:00
Ivan Kopeykin 022cabe76f Merge branch 'main' into feature/errors-warnings-space
# Conflicts:
#	schemas/WebpackOptions.check.js
2022-02-28 15:24:59 +03:00
Tobias Koppers d77b8dd01e
Merge pull request #14857 from webpack/fix-14839
fix asset module hash
2022-02-28 12:42:35 +01:00
Ivan Kopeykin 55f0535f10 feature errorsSpace, warningsSpace 2022-02-27 14:37:53 +03:00
Aleen f05009b698 support to specify the `buildHttp.proxy` for `HttpUrlPlugin` 2022-02-26 23:20:36 +08:00
Ivan Kopeykin e819c06ec2 up enhanced-resolve version 2022-02-26 15:49:44 +03:00
Tobias Koppers 5a446d81e3 Merge branch 'main' into fix-14839 2022-02-22 11:12:13 +01:00
Tobias Koppers 45e8873ca6
Merge pull request #15397 from webpack/add-normal-module-types
add NormalModuleFactory hooks types
2022-02-22 10:48:38 +01:00
Ivan Kopeykin 2665fb118c add baseUri entry option 2022-02-21 16:23:47 +03:00
Ivan Kopeykin 93d44847bd Revert "Revert "Merge pull request #15332 from webpack/fix/context-resolve-issue-11335""
This reverts commit dd53923cd0.
2022-02-21 11:58:44 +03:00
成仕伟 cf52880fb6 update type.d.ts file 2022-02-19 01:17:10 +08:00
Tobias Koppers dd53923cd0 Revert "Merge pull request #15332 from webpack/fix/context-resolve-issue-11335"
This reverts commit 89c92bf0d3, reversing
changes made to a28af55ca1.
2022-02-17 14:43:51 +01:00
Ivan Kopeykin c09d86961d add NormalModuleFactory hooks types 2022-02-15 18:25:44 +03:00
Tobias Koppers 18c3590b28
Merge pull request #15315 from webpack/fix/issue-13022
update topLevelDeclarations for ConcatenatedModule
2022-02-14 14:46:43 +01:00
taranek 64edd98cd3 feat(types): import types needed for export in index.js 2022-02-12 18:43:48 +01:00
taranek cf4b97ca16 refactor(types): removed unused export 2022-02-12 18:04:02 +01:00
taranek 7647919de4 feat(types): expose Argument,EntryOptions,FileCacheOptions,AssetEmittedInfo,Problem types 2022-02-12 18:03:16 +01:00
Ivan Kopeykin cd3ec1da92 refactor top level declarations usage 2022-02-11 17:59:35 +03:00
Tobias Koppers 89c92bf0d3
Merge pull request #15332 from webpack/fix/context-resolve-issue-11335
handle several resources in ContextModule
2022-02-10 17:18:52 +01:00
Tobias Koppers afdb254093 update typings 2022-02-08 10:12:34 +01:00
Tobias Koppers abcf53296d update typescript 2022-02-08 10:12:29 +01:00
Ivan Kopeykin 9951d9d4d9 handle several resources in ContextModule 2022-02-08 11:12:32 +03:00
Ivan Kopeykin 59437ccd10 dont count optional chaining in import specifier
instead of full member expression use only non-optional member expression part
2022-02-07 16:14:22 +03:00
Ivan Kopeykin c09e82fcfe add importMeta to JavascriptParserOptions:
- enable/disable import.meta parsing
- when disabled insert output.importMetaName
2022-01-27 22:54:47 +03:00
pavelsavara 73bb43139d - add new config section importMeta
- use it in ImportMetaPlugin to switch it off as necessary
2022-01-25 16:08:56 +01:00
Tobias Koppers e2d214a1ce
Merge pull request #15200 from webpack/feature/css-exports-in-node
allow to generate only exports for css in node
2022-01-20 23:36:49 +01:00
Tobias Koppers 1ed8aaf2e2
Merge pull request #14173 from tosmolka/tosmolka/14075
Support Trusted Types in EvalSourceMapDevToolPlugin
2022-01-20 17:36:55 +01:00
Tobias Koppers 8828dfa394 add experimental SyncModuleIdsPlugin 2022-01-20 13:37:28 +01:00
Tobias Koppers 1489b91a98 allow to generate only exports for css in node
add more options to the DeterministicModuleIdsPlugin to allow to opt-in into a fixed mode

optimize module iterations for module id assignment
2022-01-19 15:17:01 +01:00
Tobias Koppers d631d14116
Merge pull request #15015 from Knagis/feature/assetModules/outputPath
Add 'outputPath' configuration option for resource asset modules
2022-01-19 14:30:48 +01:00
Tobias Koppers e2bfe58994 nitpicks 2022-01-19 09:18:17 +01:00
Emily M Klassen d5bb62b68e doc: improve definition of addChunkInGroup via jsdoc 2022-01-18 15:44:17 -08:00
Karlis Gangis 2fc4c8da1b Add 'outputPath' configuration option for resource asset modules 2022-01-18 13:45:42 +02:00
Emily M Klassen 5c0767a423 fix: add missing overload for addChunkInGroup 2022-01-17 13:30:43 -08:00
Tobias Koppers 508877c91d
Merge pull request #15050 from luffy84217/fix-callback-err-type-should-include-null
fix callback err type should include null
2022-01-17 17:52:42 +01:00
Tobias Koppers 951dac6bc8
Merge pull request #14953 from snitin315/feat/cli-description
feat: allow specific description for CLI options
2022-01-17 13:14:49 +01:00
Asriel Yu f0a8664895
update type.d.ts by special-lint-fix 2022-01-17 14:06:13 +08:00
Asriel Yu 96da766002
Merge branch 'webpack:main' into fix-callback-err-type-should-include-null 2022-01-14 20:07:21 +08:00
Tobias Koppers 713aa3715f fix missing css runtime when only initial css is used 2022-01-13 10:40:53 +01:00
Asriel Yu 0105d7d3e6 add omitted types should include null 2022-01-11 19:41:14 +08:00
Tobias Koppers 2f2991a967 Merge branch 'main' into support-cjs-static-named-exports 2022-01-10 14:38:57 +01:00
Tobias Koppers 102014bf54 fix target expression
fix externals

add test case
2022-01-10 14:33:34 +01:00
Asriel Yu 136b723023 fix callback err type should include null 2021-12-24 20:27:31 +08:00
Tobias Koppers 16784692d3 add `output.cssChunkFilename` 2021-12-17 12:18:01 +01:00
Nitin Kumar 34471196f3 chore: update types 2021-12-12 15:15:59 +05:30
Tobias Koppers e67ab7fad2 resolve todos, nitpicks 2021-12-03 08:47:17 +01:00
Tobias Koppers 8ae9507196 add support for url() in css 2021-12-03 08:46:24 +01:00
Tobias Koppers 77b5589c1a css generation and hmr 2021-12-03 08:46:22 +01:00
Ivan Kopeykin 405ce48637 fix discussion 2021-11-30 16:36:34 +03:00
Ivan Kopeykin c243a4b022 Merge branch 'main' into feature-14072
# Conflicts:
#	schemas/WebpackOptions.check.js
2021-11-30 13:56:01 +03:00
Ivan Kopeykin 8d8e2e3fa4 fix asset module hash 2021-11-29 19:37:32 +03:00
Brian McBride 791347fc91 Adding types 2021-11-29 08:58:48 +01:00
Tobias Koppers e889c7bec5 Merge branch 'main' into improve-runtime-template 2021-11-26 08:46:49 +01:00
Tobias Koppers 3eff82d0f9
Merge pull request #14806 from webpack/fix-12924
use "safe" global object
2021-11-26 08:40:29 +01:00
Tobias Koppers 7025319eea upgrade watchpack
use new collectTimeInfoEntries method from watchpack

add more efficient Watcher.getInfo method
2021-11-25 09:27:04 +01:00
Ivan Kopeykin edeaa6eb82 use "safe" global object 2021-11-23 20:40:03 +03:00
Ivan Kopeykin 2b87b64de9 rename to runtimeTemplate.concatenation 2021-11-22 18:11:03 +03:00
Ivan Kopeykin 1bdc48e32b improve runtime template
- add optional chaining support check,
- add template string support check,
- use template string in asset generator
2021-11-21 21:18:11 +03:00
evilebottnawi d55382ed79 fix: remove links in clean plugin 2021-11-10 19:58:00 +03:00
Tobias Koppers 9bb5651e6a add `asyncChunks: boolean` option to disable creation of async chunks 2021-11-10 15:04:44 +01:00
Tobias Koppers 7afcc5d4ff allow to disable some deprecations
add `experiments.backCompat: false` (default in `experiments.futureDefaults`)
remove unused `experiments.asset`
enable `experiments.topLevelAwait` and `experiments.asyncWebAssembly` by default in `experiments.futureDefaults`
2021-11-05 09:54:51 +01:00
Tobias Koppers c29fd04793
Merge pull request #14220 from webpack/dependabot/npm_and_yarn/tapable-2.2.1
chore(deps): bump tapable from 2.2.0 to 2.2.1
2021-11-03 16:42:25 +01:00
Tobias Koppers 94f8a21999 update types.d.ts 2021-11-03 16:41:55 +01:00
Tobias Koppers 53fbc86887 Merge branch 'main' into mamolin/allow-ignore 2021-11-03 12:41:51 +01:00
Tobias Koppers d9c592738a refactor and add test cases
add `parser.exportPresence`, `parser.importExportPresence`, `parser.reeexportExportPresence` `"error" | "warn" | "auto" | false`
2021-11-02 18:29:47 +01:00
Tobias Koppers e189971705 Merge branch 'main' into mamolin/allow-ignore 2021-11-02 13:46:25 +01:00
Tobias Koppers 6e50595cad split chunks `chunks` filter also affects fallbackCacheGroup
add `splitChunks.fallbackCacheGroup.chunks`
2021-11-02 13:23:09 +01:00
Ivan Kopeykin 166be712c0 Merge branch 'main' into feature-14072
# Conflicts:
#	lib/dependencies/CachedConstDependency.js
#	schemas/WebpackOptions.check.js
2021-10-30 21:36:39 +03:00
Tobias Koppers a6bb3e58ec default to the default hash function 2021-10-28 15:32:06 +02:00
Tobias Koppers dcf3b02aaf add wasm md4 implementation
expose createHash is loader context
2021-10-28 00:07:26 +02:00
Tobias Koppers 691e37b6f1 add missing descriptions to schema 2021-10-25 12:33:33 +02:00
Tobias Koppers 4a1d4e6dba Merge branch 'main' into feat/lazy-compilation-backend-https-support 2021-10-25 12:18:53 +02:00
Tobias Koppers ba154bc741 refactor and add test case 2021-10-25 12:12:52 +02:00
Tobias Smolka f6d187bbfb Merge branch 'main' of https://github.com/webpack/webpack into tosmolka/14075 2021-10-20 16:07:33 +02:00
Tobias Koppers 3d3c65f50f add splitChunks.minSizeReduction 2021-10-19 12:35:04 +02:00
Tobias Koppers ae52a74802 improve buildHttp
allow multiple configurations to write to the same lockfile
add allowedUris for allowlisting
add schema validation
2021-10-19 09:21:05 +02:00
Tobias Koppers 576c260470
Merge pull request #14513 from webpack/feature/module-phases-hooks
add hooks during module build
2021-10-19 00:22:20 +02:00
Tobias Koppers 8f341ebaf8 add hooks during module build 2021-10-18 23:35:55 +02:00
Tobias Koppers 5e16d642ad allow RegExp as managed and immutable paths
add all node_modules as managedPaths in futureDefaults
2021-10-18 22:56:41 +02:00
Tobias Koppers e26ac7540a handle non-existing directories
fixes #14441
2021-10-13 10:51:36 +02:00
Tobias Koppers 1ee6f808d3 Revert "track chunk combinations for modules"
This reverts commit 0e13c7dea4.
2021-10-08 15:08:48 +02:00
Mark Molinaro b422943d2a Limit scope of changes to just HarmonyExportImportedSpecifierDependencies 2021-10-07 20:55:49 +00:00
Tobias Koppers 049b859879 compute depth faster 2021-10-07 16:13:42 +02:00
Tobias Koppers 643f1200c0 skip chunk conditions faster 2021-10-07 15:55:22 +02:00
Tobias Koppers 0e13c7dea4 track chunk combinations for modules
improves caching
improves SplitChunksPlugin
2021-10-07 15:43:27 +02:00
Tobias Koppers 508e8d50f2 expand readResource hook to cover normal file reading 2021-10-07 10:28:44 +02:00
Tobias Koppers a6fc14b667 update types 2021-10-06 15:39:21 +02:00
Tobias Koppers 1e5abcc51b improve extractBlockModules 2021-10-06 15:39:21 +02:00
Tobias Koppers f05246efcb use buildInfo instead of hash for cacheUnaffected 2021-10-05 15:09:39 +02:00
Tobias Koppers 91b6972144 add memCache2 for mem caching with module/chunk ids 2021-10-05 15:08:18 +02:00
Tobias Koppers a0a5f28510 allow ExternalModules to be unsafe cached 2021-10-01 16:27:20 +02:00
Tobias Koppers 61569e26b9 compare references modules when restoring mem cache 2021-09-29 09:09:42 +02:00
Tobias Koppers 931d14615f move unsafe cache from NormalModuleFactory to Compilation to skip more processing 2021-09-28 11:37:29 +02:00
Tobias Koppers c33a64bb23 enable to use mem cache for dependency caching 2021-09-27 20:41:24 +02:00
Tobias Koppers 16fc4bb7af allow dependencies to select level of propagation 2021-09-27 20:38:08 +02:00
Tobias Koppers 2393892434 assign each module it's own mem cache
instead of receiving a per module node per access
2021-09-27 20:37:30 +02:00
Tobias Koppers 3b48429eb5 add MemCache for memory caching per module which is invalidated when module or any referenced modules changes
add `experiments.cacheUnaffected`
add `cache.cacheUnaffected` (type: memory) resp `cache.memoryCacheUnaffected` (type: filesystem)
2021-09-24 15:23:29 +02:00
Tobias Koppers aa83e463c5
Merge pull request #14291 from webpack/feature/eval-bailouzt
avoid bailout of unused eval
2021-09-24 10:13:05 +02:00
Tobias Koppers 4a8bf4c084 allow to configure all hash functions used
fix default hash function for HttpUriPlugin to sha512
2021-09-23 14:55:13 +02:00
Tobias Koppers 18ee3fb1a9 avoid bailout of unused eval
expose InnerGraph and runtime utils
2021-09-20 17:40:51 +02:00
Tobias Smolka f26d9d4a88 Merge branch 'main' of https://github.com/webpack/webpack into tosmolka/14075 2021-09-17 09:26:44 +02:00
Chaz Gatian 537da95879 feat: add lazyCompilationBackend configuration
support customizing lazyCompilationBackend's port and server options

Fixes #14053, Fixes #14205
2021-09-16 10:47:04 -04:00
Ivan Kopeykin 4af7304652 fix lint 2021-09-14 22:38:42 +03:00
Ivan Kopeykin 6c3a04d5ce add node-module option for node.__file/dirname
evaluate __filename and __dirname for common js modules when output.module to
fileURLToPath(import.meta.url) and fileURLToPath(import.meta.url + "/..") respectively
2021-09-14 16:50:03 +03:00
Tobias Koppers 562f17a8c0
Merge pull request #14212 from webpack/fix-14210
add options to warn on using Node.js features
2021-09-14 14:03:05 +02:00
Ivan Kopeykin 5592f6616f add experiments.futureDefaults
futureDefaults applies next major defaults
adds node.global=warn
node.__filename=warn-mock
node.__dirname=warn-mock
2021-09-14 11:29:57 +03:00
Ivan Kopeykin 8068923063 fix IgnorePlugin schema 2021-09-11 13:55:24 +03:00
Tobias Smolka dcbba885ba Fix linting errors 2021-09-08 14:58:29 +02:00
Tobias Smolka 59aa7b7c0b Fix linting errors 2021-09-08 13:09:01 +02:00
Tobias Koppers a513b1381a
Merge pull request #14118 from webpack/bugfix/multiple-module-externals
fix null module externals
2021-09-03 16:46:55 +02:00
Tobias Koppers 4e8a621bfa fix null module externals 2021-09-03 13:47:09 +02:00
Tobias Koppers 60408e1136 add importModule to loader context by default
always enable experiments.executeModule and remove it
2021-09-02 16:27:39 +02:00
Tobias Koppers b16568a253 upgrade filename runtime module to full hash module when referencing a full hash chunk 2021-09-02 10:29:59 +02:00
Tobias Koppers 9577b88d4b track and resolve symlinks when reading context timestamps/hashes
refactor context snapshotting for abstraction purposes
add (symlink) unit test cases for FileSystemInfo snapshotting
2021-08-18 14:50:23 +02: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 1f0bdf7220
Merge pull request #13961 from webpack/feature/hashbang
handle hashbangs in javascript files
2021-08-10 17:32:43 +02:00
Tobias Koppers 720aa43bd3 handle hashbangs in javascript files
fixes https://github.com/vercel/next.js/issues/27806
2021-08-10 11:34:06 +02:00
chenxsan ce7d9e572c fix a typo 2021-08-07 11:39:51 +08:00
Tobias Koppers 9bf6797416 fix resolving context for redirects 2021-08-05 21:10:39 +02:00
Tobias Koppers 30ebedd4dd fix handling of new URL() in remote resources 2021-08-05 17:37:37 +02:00
Tobias Koppers b6609a4f6b add `experiments.buildHttp`
allows to build remote resources
stores remote resources in a lockfile
2021-08-05 15:47:18 +02:00
Sven Sauleau 6c50c81350 Revert "Revert "Merge pull request #12278 from xtuc/sven/import-assertions""
This reverts commit 61946b7c46.
2021-07-24 23:28:30 +01:00
Tobias Koppers 0bd1e789d4 generate "use strict" only when really needed 2021-07-22 16:09:09 +02:00
Tobias Koppers d3f8e16810 update webpack-sources for performance problem in hashing
add `stats.reasonsSpace` and `stats.groupReasonsByOrigin` to control large set of reasons
`detailed` preset limites all spaces to 1000 by default

fixes #13825
2021-07-20 13:29:25 +02:00
Tobias Koppers 61946b7c46 Revert "Merge pull request #12278 from xtuc/sven/import-assertions"
This reverts commit df02bc6c0a, reversing
changes made to a6f341e243.
2021-07-16 21:54:21 +02:00
Tobias Koppers df02bc6c0a
Merge pull request #12278 from xtuc/sven/import-assertions
parse import assertions
2021-07-16 17:07:28 +02:00
Tobias Koppers a6f341e243
Merge pull request #13555 from markjm/markjm/dont-copy-maps 2021-07-16 16:58:25 +02:00
Tobias Koppers bb6c596272 improve schema and description 2021-07-16 13:17:49 +02:00
Tobias Koppers 7f22e4721f match on asserts
change Map to Record
improve test case
2021-07-16 13:17:20 +02:00
Sven Sauleau b166f46f2c parse import assertions 2021-07-16 13:14:54 +02:00
Tobias Koppers 8dd38f5c8a refactor 2021-07-16 13:05:18 +02:00
Nitin Kumar d3fe3a331c update types.d.ts 2021-07-15 16:58:22 +05:30
Mark Molinaro 41f02f947a perf: let Compiler worry about and manage file and context timestamps 2021-07-13 22:13:40 +00:00
Tobias Koppers 94852e07f7 allow to disable runtime chunk per entry via `runtime: false`
and also via `ModuleFederationPlugin`.`runtime`
2021-07-05 11:32:45 +02:00
Tobias Koppers 492055ae90 add cache compression 2021-07-02 07:05:13 +02:00
Tobias Koppers b443555501 this is a workaround to remove compilation-specific references from modules in the unsafe cache
I'm not proud of this solution, but it fixes it for now
Long term we might move these kind of references out of the module
into some kind of compilation/module graph specific store.
But that's not yet possible for backward-compat reasons.
2021-07-01 11:46:59 +02:00
chenxsan 02173d571a add node-commonjs to ExternalsType 2021-06-29 23:11:04 +08:00
chenxsan 82c8a5c092 update webpack options 2021-06-29 12:33:28 +08:00
Tobias Koppers f7766875bc
Merge pull request #13649 from webpack/cache/automatic-store
store cache after large changes
2021-06-28 17:35:14 +02:00
Tobias Koppers 142bc5610f store cache after large changes
detect larger changes automatically and use shorter timeout
2021-06-28 11:35:14 +02:00
Tobias Koppers 35a399e81a add dependencyType to externals function data 2021-06-24 16:45:14 +02:00
Tobias Koppers 629f9f031c add support for module externals and automatic externals 2021-06-24 16:44:14 +02:00
Tobias Koppers 4da99d8254 add `module` library support, test and example
add test cases for `experiments.outputModule`
2021-06-23 14:49:14 +02:00
Tobias Koppers d09cc17cee use types from estree 2021-06-22 09:47:29 +02:00
Tobias Koppers 1edacddaa4 prettier 2021-06-21 11:18:23 +02:00
Tobias Koppers e1c6d583cc
Merge pull request #13577 from Smona/master
Correct emitFile content argument type
2021-06-18 12:24:40 +02:00
Tobias Koppers 8affe0f21e update types.d.ts 2021-06-18 10:56:27 +02:00
Tobias Koppers f5fac83c08 clear compilation queues to reduce memory usage 2021-06-17 10:10:51 +02:00
Juho Vepsäläinen 9d01479d4e chore: Update types 2021-05-31 14:55:35 +03:00
Tobias Koppers 4845915c0b Lazy require some modules 2021-05-26 21:35:46 +02:00
Tobias Koppers fe6d28dd16
Merge pull request #13412 from webpack/bugfix/watcher-invalidate-and-changes
track changes and removals correctly during watching
2021-05-20 15:53:52 +02:00
Tobias Koppers 8e9daad216 track changes and removals correctly
purge filesystem correctly
2021-05-19 19:06:58 +02:00
Tobias Koppers 973edfbd1b support data urls as input in `new URL` 2021-05-19 11:30:09 +02:00
Tobias Koppers ca2b56f5a0
Merge pull request #13296 from bolariin/issue-13284
fix: resolve mismatch with types declaration and docs for resourceQuery
2021-05-19 07:06:08 +02:00
Tobias Koppers 08090a9fee
Merge pull request #13401 from webpack/pascal-readonly-array
accept a readonly array for configuration options
2021-05-19 07:03:10 +02:00
Tobias Koppers ad75cca1e0 Merge branch 'master' into pascal-readonly-array 2021-05-18 17:07:52 +02:00
Tobias Koppers 23f492f8ef update typings 2021-05-18 16:00:45 +02:00
Tobias Koppers c7d7940517 Merge branch 'master' into issue-13284 2021-05-17 16:22:54 +02:00
Tobias Koppers 0e881beb35 fix schema for absolute conditions and add test cases 2021-05-17 16:21:33 +02:00
Tobias Koppers 226a77c9d4
Merge pull request #13344 from webpack/dependabot/npm_and_yarn/typescript-4.2.4
chore(deps-dev): bump typescript from 4.2.0-beta to 4.2.4
2021-05-11 10:34:38 +02:00
Tobias Koppers b0fa9ccada pretty files 2021-05-11 09:31:46 +02:00
Tobias Koppers 8ae9e3687e update declarations 2021-05-11 09:26:40 +02:00
Tobias Koppers 3de13caba7
Merge pull request #13331 from dhruvit-r/bugfix/fs-call-signatures 2021-05-10 15:52:47 +02:00
Dhruvit Raithatha e085eebd6c make errors nullable for call signatures of filesystem types 2021-05-10 15:18:22 +05:30
Tobias Koppers 2e2cd6de85
Merge pull request #9856 from koto/tt-integration 2021-05-10 11:27:42 +02:00
Tobias Koppers 88da3f8ed2 normalize output.trustedTypes to an object 2021-05-10 10:34:21 +02:00
Tobias Koppers 7d42aa7a30 better types for normalized options 2021-05-10 09:58:27 +02:00
Tobias Koppers 869f9c8a8c use createScriptUrl only when needed 2021-05-10 09:58:27 +02:00
Tobias Koppers 4b1592d07a rename createScriptURL to createScriptUrl 2021-05-10 09:09:34 +02:00
Tobias Koppers bb8ba1cd05 disable trustedTypes by default
allow to pass a boolean as trustedTypesPolicy
2021-05-10 09:02:46 +02:00
Tobias Koppers 442a1ebca5 rename validate function to avoid conflict 2021-05-07 18:14:25 +02:00
Tobias Koppers 87c0d1cd94 Merge branch 'master' into johnnyreilly/master 2021-05-07 18:07:23 +02:00
Tobias Koppers 77f625ab09 upgrade tooling and update types.d.ts
fixed SourceMap
import Schema from validate function
2021-05-07 18:01:45 +02:00
Krzysztof Kotowicz 3561285ea8 Skip using Trusted Types checks if trustedTypesPolicyName is empty. 2021-05-07 10:30:57 +02:00
Bolarinwa Balogun 23df156f32 Add description to 'RuleSetLogicalConditions' definition 2021-05-06 18:54:18 -04:00
Bolarinwa Balogun 0d1e2f9c5b Apply requested changes 2021-05-06 07:57:33 -04:00
Bjarki b6e112dabe Only expose createScriptURL function from Trusted Types policy
Since createScriptURL is the only function that is used on webpack's
Trusted Types policy, replace the getTrustedTypesPolicy global with a
simpler createScriptURL global.

In terms of compiled code, this replaces the non-minifiable
tt().createScriptURL(url) with tu(url), which is more compact in terms
of code size.
2021-05-04 16:26:22 +02:00
Bjarki c71184958d Move Trusted Types policy into TrustedTypesRuntimeModule
Also make the policy available at runtime through
RuntimeGlobals.getTrustedTypesPolicy(), and update runtime dependencies
accordingly.
2021-05-04 16:12:41 +02:00
Krzysztof Kotowicz dbd095b44a Added the Trusted Types logic. 2021-05-04 16:12:34 +02:00
Krzysztof Kotowicz c816c135ca Removed a deprecated createURL function reference. 2021-05-04 16:06:37 +02:00
Bolarinwa Balogun 743b190816 fix: resolve mismatch with types declaration and docs for resourceQuery 2021-05-03 11:40:26 -04:00
Tobias Koppers 766be5a3fd add cache.profile flag for more info about (de)serialization timings 2021-04-28 09:10:43 +02:00
Tobias Koppers 0abe3df1c6
Merge pull request #13235 from webpack/feature/class-fields
add support for class fields
2021-04-27 11:37:04 +02:00
Tobias Koppers 94facd387d add support for class fields 2021-04-27 10:28:13 +02:00
Tobias Koppers 0aff7d2c63 avoid creating objects for location info when not accessed 2021-04-27 09:36:52 +02:00
Tobias Koppers acfea9dae4 improve module graph hashing via bigints 2021-04-23 14:51:24 +02:00
Tobias Koppers b71e0ced35 Merge branch 'master' into johnnyreilly/master 2021-04-22 21:52:48 +02:00
Tobias Koppers ea53a23827 improve LoaderContext declaration
upgrade tooling
2021-04-22 21:48:29 +02:00
Tobias Koppers 7cc40782b7 fix some internal types 2021-04-22 21:48:25 +02:00
Tobias Koppers e42915cf49 clean up types 2021-04-22 10:54:50 +02:00
John Reilly 984308ada9 generate types with yarn special-lint-fix 2021-04-22 09:44:54 +01:00
John Reilly 8cd30eb222 revert generic approach 2021-04-20 18:12:16 +01:00
Tobias Koppers 177736f59c avoid leaking unused memory in buffer backing stores in development mode 2021-04-20 15:22:16 +02:00
John Reilly 40a5eb17fe tried generic workarouuund 2021-04-20 09:18:59 +01:00
John Reilly a679319ce6 bring in suggested types 2021-04-20 09:06:34 +01:00
John Reilly 1578fd4f2f schema 2021-04-20 09:01:46 +01:00
John Reilly 79da3201ac non generics 2021-04-20 08:41:42 +01:00
John Reilly df44d7d8b7 attempt @sokras suggestion 2021-04-20 06:05:54 +01:00
John Reilly a2f8808fee apply @sokra's feedback and include runtime type 2021-04-19 19:30:58 +01:00
Tobias Koppers adb207e004 update types 2021-04-19 10:39:59 +02:00
John Reilly 586d013b91 feat: LoaderContext type 2021-04-16 19:28:30 +01:00
jamesgeorge007 cf0d841253 chore: fix lint 2021-04-14 23:14:08 +05:30
jamesgeorge007 ec1eb4b037 chore: update type definitions 2021-04-14 22:44:05 +05:30
Tobias Koppers aca0ee5073
Merge pull request #13137 from webpack/feature/public-path-entry
allow to specify `publicPath` for each entrypoint
2021-04-14 18:22:59 +02:00
Tobias Koppers 52178a5aee
Merge pull request #13134 from webpack/bugfix/hmr-in-execute-module
importModule & HMR
2021-04-14 16:55:37 +02:00
Tobias Koppers 38de0dbf4e allow to specify `publicPath` for each entrypoint 2021-04-14 16:38:01 +02:00
Tobias Koppers f46e816a38 add HMR test case and fix problems with it 2021-04-14 16:03:59 +02:00
Tobias Koppers d808d04d26 attach the chunk graph to RuntimeModules 2021-04-14 12:26:35 +02:00
Tobias Koppers 88f4c661cd update tooling to fix type constraint bug 2021-04-14 11:15:08 +02:00
Tobias Koppers bbcc5a8ebe add caching on ModuleGraph
cache star reexport assignment
2021-04-14 09:11:23 +02:00
Tobias Koppers 03961f3391
Merge pull request #13102 from webpack/feature/built-time-execution 2021-04-12 15:00:32 +02:00
Tobias Koppers ea3e0a39ac add experiments.executeModule
rename runModule -> executeModule
improve error reporting
2021-04-12 12:27:55 +02:00
Tobias Koppers 0a9041e1cc AsyncQueue only returns WebpackError 2021-04-12 12:27:55 +02:00
Tobias Koppers 1d35cf13e3 fix cache dependencies, assets and persistent caching 2021-04-12 12:27:54 +02:00
Tobias Koppers 065177df66 add experimental support for build time execution
allow to execute a part of the module graph at build time
e. g. to generate code or other assets

loaders have access to that via `this.importModule(request, options)`
2021-04-12 12:27:54 +02:00
Tobias Koppers 33b44a05ea DefinePlugin invalidates modules when new defines are added
fixes https://github.com/vercel/next.js/issues/23901
2021-04-12 12:23:51 +02:00
Tobias Koppers 324a46d908 Revert "dispose code generation results after sealing the compilation"
This reverts commit cef2a8fea0.
2021-04-09 19:50:13 +02:00
Tobias Koppers cef2a8fea0 dispose code generation results after sealing the compilation 2021-04-08 18:33:51 +02:00
Tobias Koppers 83c8180c7d prioritize static reexport over runtime reexport for target determination
this allows to optimize cases where empty modules are reexported e. g. caused by typescript type-only exports
2021-04-06 21:36:43 +02:00
Tobias Koppers 48b7cce9ce
Merge pull request #13051 from KENNYSOFT/infrastructurelogging-colors 2021-04-06 18:13:52 +02:00
Tobias Koppers 4e117781e8 improvements
add appendOnly flag
add custom console
add custom stream
2021-04-06 15:20:27 +02:00
Tobias Koppers 8f3a16a49a improve handling of optional build dependencies 2021-04-06 11:28:41 +02:00
Hyeonmin Park 72ba68cc78 feat: add colors flag to infrastructureLogging 2021-04-04 14:28:31 +09:00
Tobias Koppers 3b8d26df1e
Merge pull request #12990 from webpack/bugfix/memory-leak-in-ic
memory usage improvements, add GC support for memory cache, persistent cache only mode
2021-04-01 18:14:16 +02:00
Tobias Koppers b9519dcf01
Merge pull request #12987 from barak007/export-missing-entities
Export AsyncDependenciesBlock and ModuleDependency
2021-04-01 17:32:48 +02:00
Tobias Koppers e42f6d71d5
Merge pull request #12963 from smelukov/add-missing-groupModulesByType
(fix): add missing scheme property stats.groupModulesByType
2021-04-01 17:31:15 +02:00
Tobias Koppers c84329f73c add GC to the memory cache and make it configurable
memory GC happens by default when persistent cache is enabled and in development mode
otherwise memory cache is kept forever

make maxAge for persistent cache configurable
GC the oldest content file even if it's not touched (to keep cache size small)

filesystem cache will now no longer cache in memory, but restore items from disk again when it was persisted
2021-04-01 17:12:53 +02:00
Tobias Koppers 8074127b98 avoid leaking memory after the compiler has been closed
clear cache on shutdown
2021-04-01 16:59:48 +02:00
Tobias Koppers 667bbf02bb export base dependencies correctly 2021-03-31 16:40:24 +02:00
Tobias Koppers f8b7625c43 expose all Stats child types 2021-03-31 13:37:53 +02:00
43081j d67a5946d2 re-run type generation using yarn
Yarn produces different types to npm, who knew.
2021-03-29 22:18:57 +01:00
43081j 64fc30f0fe expose StatsAsset type
Fixes #13014
2021-03-29 22:02:31 +01:00
Barak Igal 92e8a1252e export AsyncDependenciesBlock and ModuleDependency 2021-03-25 15:37:20 +02:00
Sergey Melyukov 515d0d6d4a (chore): fix types 2021-03-23 14:41:30 +03:00
Tobias Koppers 0307bcf691
Merge pull request #12902 from xiaoxiaojx/feat/assetModulePublicPath 2021-03-23 07:56:55 +01:00
Tobias Koppers c5fa7510f2 remove `output.assetModulePublicPath` as it would be redundant to `module.generator.asset.publicPath`
add test case for assetInfo merging
2021-03-22 15:05:50 +01:00
xiaoxiaojx 55fd79ee6a feat: support assetModulePublicPath 2021-03-20 17:53:01 +08:00
Tobias Koppers a93eb10903 fix problem with strict mode for assigning libraries with separate runtime chunk 2021-03-16 19:53:13 +01:00
Tobias Koppers 2abcede6cd
Merge pull request #12852 from chenxsan/test/test-library-type-assign 2021-03-15 20:33:14 +01:00
Tobias Koppers 53e6f98ff6
Merge pull request #12887 from webpack/issue-12885
fix: es5
2021-03-15 17:02:03 +01:00
Tobias Koppers d5992633e6 offer a hook to opt-out of strict mode 2021-03-15 16:38:50 +01:00
Tobias Koppers 5af7e54e7d
Merge pull request #12896 from webpack/feature/define-cache-version
DefinePlugin takes care of module invalidation when values have changed
2021-03-15 16:14:35 +01: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 103a51468b DefinePlugin takes care of module invalidation when values have changed
The options of the DefinePlugin no longer have to be covered by build dependencies
2021-03-15 15:19:42 +01:00
Tobias Koppers 18967078cb cleanup modules after compilation to avoid leaking references when they are cached 2021-03-15 11:23:54 +01:00
Tobias Koppers 61cc65c58e improve parsing to handle non-literal options 2021-03-12 12:09:02 +01:00
Tobias Koppers ab74839859
Merge pull request #12871 from webpack/feature/generate-asset
add `emit` option for asset modules
2021-03-11 21:00:05 +01:00
Tobias Koppers 7572217e97 add `emit` option for asset modules
fixes #12474
2021-03-11 18:45:34 +01:00
Tobias Koppers 72455273db allow to define "ignored modules" per dependency
new URL() will use `"data:"` when ignore
2021-03-11 18:37:20 +01:00