Tobias Koppers
77b5589c1a
css generation and hmr
2021-12-03 08:46:22 +01:00
Tobias Koppers
a8b00f864c
nitpicks
2021-10-25 12:21:14 +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 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
91b6972144
add memCache2 for mem caching with module/chunk ids
2021-10-05 15:08:18 +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
4a8bf4c084
allow to configure all hash functions used
...
fix default hash function for HttpUriPlugin to sha512
2021-09-23 14:55:13 +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
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
b6609a4f6b
add `experiments.buildHttp`
...
allows to build remote resources
stores remote resources in a lockfile
2021-08-05 15:47:18 +02:00
Tobias Koppers
492055ae90
add cache compression
2021-07-02 07:05:13 +02: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
0a64c16a89
improve module support for WebWorkers
2021-06-28 12:30:25 +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
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
4da99d8254
add `module` library support, test and example
...
add test cases for `experiments.outputModule`
2021-06-23 14:49:14 +02: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
177736f59c
avoid leaking unused memory in buffer backing stores in development mode
2021-04-20 15:22:16 +02:00
Tobias Koppers
ea3e0a39ac
add experiments.executeModule
...
rename runModule -> executeModule
improve error reporting
2021-04-12 12:27:55 +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
evilebottnawi
3237c5a670
fix: prefer provided external over built-in
2021-03-02 13:11:31 +03:00
Tobias Koppers
0742a05bc1
fix `experiments.lazyCompilation: true`
2021-02-22 23:25:37 +01:00
Tobias Koppers
44b4e25b98
fixes for electron target
...
electron has `importScripts` in worker
only choose a chunkLoading which fits to the chunkFormat
prefer fetch wasm loading over node wasm loading
2021-02-15 17:19:08 +01:00
Tobias Koppers
9f3950e571
add support for libraries combined with iife: false
...
fix missing runtime requirement for system.js context
fix inlining of modules when conflicting symbols are defined on top-level
2021-02-11 11:19:24 +01:00
Tobias Koppers
36306a06e1
Merge pull request #11561 from smelukov/clean
2021-02-02 20:31:45 +01:00
Sergey Melyukov
654e4e1ba0
Merge remote-tracking branch 'upstream/master' into clean
2021-02-02 10:38:41 +03:00
Tobias Koppers
ba12efe094
change skipModule to test
...
allow values similar to `splitChunks.test`
using positive logic instead
2021-02-01 17:12:20 +01:00
Karlis Gangis
f0fa61ae1f
Add new options for lazyCompilation: imports and skipModule
2021-02-01 16:52:47 +02:00
Tobias Koppers
c4d41ffa55
nitpicks for tests
2021-01-22 10:24:25 +01:00
Tobias Koppers
100317556e
add lazy compilation for entrypoints
2021-01-22 01:01:17 +01:00
Tobias Koppers
a1515fa9f0
add experimental lazy compilation
2021-01-21 17:39:56 +01:00
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
7438a7b79f
Merge branch 'master' into webpack-is-included
2021-01-15 14:21:07 +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
c847009d87
typescript workarounds
...
see https://github.com/microsoft/TypeScript/issues/41697
2020-11-30 08:42:35 +01:00
Yanlin Jiang
02bc871f97
chore: fix case typo
2020-11-02 01:10:42 +08: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
Sergey Melyukov
ee0c891c67
(fix): pr comments
2020-10-07 15:30:14 +03:00
Sergey Melyukov
4b04a4b1f5
(feat): add output.clean
2020-09-30 18:33:30 +03:00
Tobias Koppers
ea075be453
add config.ignoreWarnings
...
deprecate stats.warningsFilter
2020-09-20 22:08:38 +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
eec6fbdd7c
extract loader.target from target option
2020-09-09 19:04:30 +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
7ae2976ef2
remove remaining incorrect code for electron from chunkLoading refactoring
2020-09-09 08:46:40 +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
0111405198
enable asset experiment
2020-09-03 14:19:09 +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
07d863e14c
implement enabledChunkLoadingTypes approach
...
allow chunkLoading per entry
allow custom library/chunkLoading types
2020-08-28 10:59:37 +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
Tobias Koppers
782fa4591f
Typo
2020-08-20 00:23:15 +02:00
Tobias Koppers
0a6f2bf401
expose missing target plugins
2020-08-19 23:17:33 +02:00
Tobias Koppers
b929d4cdce
calculate real content hash for assets after asset processing
2020-08-18 22:07:24 +02: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
1ac28f7fc2
improve progress reporting
2020-08-14 10:54:26 +02:00
Ivan Kopeykin
4f8bb44983
move matching target logic out of RuntimeModule
2020-08-06 20:58:37 +03:00
Ivan Kopeykin
ddc83b0d70
feat: url assets
2020-08-05 00:55:38 +03:00
Tobias Koppers
dfc8e35f2d
enable experiments.importAsync by default
...
remove experiments.importAwait
2020-08-04 00:47:08 +02:00
Tobias Koppers
4c3216efad
add size optimization mode to `optimization.mangleExports`
2020-07-31 12:54:38 +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
f65adade96
deprecate optimization.noEmitOnErrors in favor of optimization.emitOnErrors
2020-07-20 08:40:31 +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
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
Ivan Kopeykin
2d451a57b2
feat: new dependency __webpack_is_included__
2020-04-12 03:04:41 +03: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