Commit Graph

599 Commits

Author SHA1 Message Date
Tobias Koppers 18ae77ef56 addEntry takes options object instead of only name
remove duplication in EntryOptionsPlugin and DynamicEntryPlugin
lazy require (Dynamic)EntryPlugin in EntryOptionsPlugin
2020-02-04 21:21:42 +01:00
Tobias Koppers 9ae0b6a421 allow stats.ids in schema 2020-02-04 09:19:09 +01:00
Sergey Melyukov 7da1b5e70a feat: add entrypoint descriptor with `import` property 2020-02-03 17:46:14 +03:00
Evilebot Tnawi e162d45dfe
Update HashedModuleIdsPlugin.json 2020-01-30 14:52:16 +03:00
Sergey Melyukov bb4a0e83bc add percentBy options to ProgressPlugin 2020-01-30 12:53:36 +03:00
Tobias Koppers f5c3e1b55a cleanup 2020-01-29 14:48:46 +01:00
Sergey Melyukov b9c50fa0e4 fix pr comments 2020-01-23 13:27:12 +03:00
Sergey Melyukov c7dd45b16f generator.assetFilename -> generator.filename 2020-01-22 16:19:45 +03:00
Sergey Melyukov 68126cf1fc override filename for asset modules 2020-01-22 16:08:29 +03:00
Tobias Koppers c636fc62d3 change DllPlugin entryOnly default to true 2020-01-02 17:46:21 +01:00
opl- 22569ce792 fix ResolveOptions.plugins types
closes #10073
2019-12-05 19:24:40 +01:00
Tobias Koppers 7abd77d8d4 fix typings for parse option 2019-11-30 21:56:21 +01:00
Sergey Melyukov fce234f6b9 Merge remote-tracking branch 'upstream/master' into custom-json-parser 2019-11-30 14:17:48 +03:00
Sergey Melyukov e934792b2a support custom parser for json modules 2019-11-28 20:12:11 +03:00
Tobias Koppers 0ea81b542c get rid of some hacks in declarations file 2019-11-28 16:19:18 +01:00
Tobias Koppers 317da38171 move data url condition to parser
avoid calling dataUrl function repeated
remove cache to avoid memory leak
include data url decision in module hash
refactor code for readablility
2019-11-26 15:43:58 +01:00
Tobias Koppers 5f8ad0dd67 inline encoder file into AssetGenerator 2019-11-26 15:43:32 +01:00
Sergey Melyukov d2248fc3fa refactor: drop `enabled` option, fix test 2019-11-26 15:42:43 +01:00
Sergey Melyukov bdc61abf82 refactor: merge generators in asset modules 2019-11-26 15:42:37 +01:00
Sergey Melyukov 2d5844c56e refactor: fix review comments 2019-11-26 15:42:16 +01:00
Sergey Melyukov 491cb57cb4 initial improvement for asset modules 2019-11-26 15:41:48 +01:00
Tobias Koppers 552ca1e3b9 add dependencies to ProgressPlugin
include module dependencies in module progress
improve progress percentage calculation
2019-11-12 11:49:48 +01:00
Tobias Koppers 07671f3481 allow to disable compareBeforeEmit 2019-11-04 16:46:45 +01: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 b5e8915b14
Merge pull request #9736 from vankop/limit-chunk-count-plugin
fix: Limit chunk count plugin
2019-10-21 09:02:49 +02:00
Tobias Koppers c1d1e91bd6 allow all possible combinations with pattern 2019-10-18 14:58:50 +02:00
evilebottnawi c81ffbef42 refactor: `devtool` option 2019-10-18 14:43:21 +02:00
Tobias Koppers fc04bf15bc Do not show stack trace of errors in stats by default
Add new `stats.errorStack` option to display it anyway.
2019-10-15 07:43:37 +02:00
evilebottnawi 8764f14794 feat: improve DX with `output.ecmaVersion` option 2019-10-11 00:43:27 +03: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 f7f408372f Merge tag 'v4.41.0' into next
4.41.0
2019-09-26 21:41:52 +02:00
Ivan Kopeykin 1e4743dea4 Make maxChunks property required. Same as minChunkSize for MinChunkSizePlugin 2019-09-25 16:54:36 +03:00
Ivan Kopeykin 8aa0814709 Remove minChunkSize option from LimitChunkCountPlugin 2019-09-25 16:03:29 +03:00
Tobias Koppers 03b32d3765 disallow shorthand cache groups syntax with cache group named test
This is a potential config error

fixes #9722
2019-09-24 17:17:26 +02:00
Tobias Koppers 7bde43f47a Merge tag 'v4.40.0' into next
4.40.0
2019-09-13 11:12: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 e507392094 add output.ecmaVersion options to set emitted code style
fix a bug with prefetching initial chunks
InitFragments have get[End]Content methods which get a sourceContext
RuntimeModules have implicit chunk and compilation
changed default to `output.ecmaVersion: 2015`
2019-08-26 21:32:29 +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
evilebottnawi 1952d5c882 fix: `ProfilingPlugin` schema 2019-08-07 21:19:08 +03:00
evilebottnawi 3a7bd7ffb4 refactor: the `outputPath` option of `ProfilingPlugin` plugin now accepts only absolute path 2019-08-07 20:36:27 +03:00
evilebottnawi c005384abb refactor: `WatchIgnorePlugin` options 2019-08-07 19:15:41 +03:00
evilebottnawi 6a99b5316d refactor: migrate on `schema-utils` 2019-08-07 18:10:40 +03:00
Tobias Koppers 2e25cd588b Merge remote-tracking branch 'origin/next' into next 2019-07-24 10:52:04 +02:00
Tobias Koppers c17dfde7a8 Merge tag 'v4.37.0' into next
4.37.0
2019-07-24 10:51:04 +02:00
Tobias Koppers 7b31890a2f more tests
add none as loglevel
2019-07-22 10:35:26 +02:00
Tobias Koppers d532c4f24f allow to configure the infrastructure logger
rename includeDebugLogging to loggingDebug
rename logToConsole to createConsoleLogger
2019-07-22 09:22:36 +02:00
Yuta Hiroto 8dcda23c36
feat(assetModule): add function type to assetModuleFilename 2019-07-21 23:05:12 +01:00
Tobias Koppers 42a9bfd225 improve logging options and display
allow more logging options in schema
collapse groups in non-verbose logging
show number of filtered logging lines
update stats presets for logging
2019-07-19 11:59:48 +02:00
Tobias Koppers d849160d3f add logging API
Plugins:
Compiler.getInfrastructureLogger(name)
Compilation.getLogger(name)

Loader:
this.getLogger([name])

API equal to console API with these methods:
error, warn, info, log, debug,
time, timeLog, timeEnd,
group, groupCollapsed, groupEnd,
profile, profileEnd,
clear
2019-07-18 17:13:40 +02:00
Tobias Koppers cac462cba8
Merge pull request #8983 from hiroppy/feature/url
add experimental Url support
2019-07-17 23:32:15 +02:00
Tobias Koppers 4fa8addeec Handle auxiliary files separately from normal files 2019-07-17 23:13:08 +02:00
Tobias Koppers 1d72a05fed Merge tag 'v4.36.0' into next
4.36.0
2019-07-17 16:02:33 +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 458f72aeb3 feat(WebpackOptions, url): add urlModuleFilename and url/experimental 2019-07-17 11:46:00 +02:00
ikopeykin bd7d95bfc1 #9391 resolve discussions, AbstractMethodError 2019-07-15 16:54:49 +03:00
ikopeykin 676c5fe172 fix ResolveOptions.alias 2019-07-12 16:40:52 +03:00
Tobias Koppers dac9572d0b add alias to false (ignore) and alias to array 2019-07-08 16:26:30 +02:00
Tobias Koppers c94073b31c update enhanced-resolve 2019-07-05 00:45:41 +02:00
Tobias Koppers 98c5f45ea8 hotfix: realResource should match absolute paths 2019-07-01 11:18:09 +02:00
Tobias Koppers 77ebab6712 update watchpack dependency 2019-07-01 09:00:19 +02:00
Tobias Koppers 5523a0a9ac
Merge pull request #9326 from vankop/add-real-resource-parameter
add realResource parameter to RuleSetRule
2019-06-30 22:04:39 +02:00
ikopeykin 68f794dbcb updated snapshots, rerun tooling scripts 2019-06-25 15:33:07 +03:00
ikopeykin b3202696d0 add realResource parameter to RuleSetRule 2019-06-25 11:31:44 +03:00
Tobias Koppers fbff5f3c75 allow filename as function at more places
fixes #9296
2019-06-18 22:22:09 +02:00
Ryan Drew 054c933950 introduce name truncation config option for SplitChunksPlugin 2019-06-15 14:20:48 -04:00
Tobias Koppers 0505e177f1 add more types and fix/remove TODOs
change Chunk.files to Set
remove checkContext from IgnorePlugin
remove external flag from ExternalModule
2019-06-14 10:45:56 +02:00
Tobias Koppers 12a3e7c854 create experiments for importAwait importAsync and (a)syncWebAssembly 2019-06-05 13:32:22 +02:00
Tobias Koppers 09f2fa7273 Merge tag 'v4.33.0' into next
4.33.0
2019-06-04 23:23:25 +02:00
Tobias Koppers ad64a1c2ca add experiment.mjs config option 2019-06-04 11:33:26 +02:00
OJ Kwon 2ec75c1cdb
feat(target): support electron preload async chunk loading 2019-05-25 18:02:00 -07:00
Tobias Koppers ad5a6d105b Merge tag 'v4.32.2' into next
4.32.2
2019-05-23 01:19:34 +02:00
Tobias Koppers a4406ff187 improve validation errors 2019-05-22 13:46:07 +02:00
Tobias Koppers c5f94f3b6a don't emit and load JS files for chunks without JS modules
allow custom module types in rules
allow configCases to access stats
2019-05-22 13:12:15 +02:00
Tobias Koppers 74d4669d73 rewrite RuleSet to RuleSetCompiler with plugins
remove some deprecated features (query, loaders)
add missing condition (realResource)
2019-05-16 11:37:52 +02:00
Tobias Koppers 92f8c36ca2 add `minRemainingSize` option for splitChunks to ensure leftover chunks from splitting have a minimum size
defaults to `minSize` of cache group
defaults to global option when not specified
global option defaults to zero in development
2019-05-13 13:10:23 +02:00
Tobias Koppers 7c5f3e758c
Merge pull request #9091 from EugeneHlushko/fix/grammar
fix(typo) remove redundant is
2019-05-09 21:57:36 +02:00
Tobias Koppers e4009e7695 Merge tag 'v4.31.0' into next
4.31.0
2019-05-09 21:38:10 +02:00
Tobias Koppers b66143f706 Merge tag 'v4.30.0' into next
4.30.0
2019-05-09 21:34:28 +02:00
Tobias Koppers b17543e0ba
Merge pull request #8919 from vincentrodriguez/errors-and-warnings-only-preset
Preset option for errors & warnings only
2019-05-09 09:52:41 +02:00
EugeneHlushko f9e877f9c1 fix(typo) remove redundant is 2019-05-04 17:46:38 +03:00
Adam Postma ff8c37e887 correct spelling mistake, update identifer to identifier 2019-04-12 10:29:41 -06:00
vincentrodriguez 85b1eb9a4a schema update to support "errors-warnings" preset 2019-03-19 10:57:08 +00:00
Joel Denning 97d58d31c0 Adding support for output libraryTarget 'system'. Resolves #8833.
Tests, prettier

Self review

Add comments to System tests.

Adding typescript definition

Guy Bedford's feedback

Self review

Improving code coverage
2019-03-17 08:46:17 -07:00
Tim Neutkens d346380a78 Make requested changes 2019-03-11 17:18:14 +01:00
Tim Neutkens d4c1f19236 Update options schema 2019-03-10 17:08:14 +01:00
Tobias Koppers 6fc0b96c9c add MangleExportsPlugin and options 2019-01-31 11:41:30 +01:00
Tobias Koppers 7c0d845af3 Refactor FileCachePlugin into multiple modules 2019-01-25 19:21:45 +01:00
Tobias Koppers ba6ac9ae81 add cache.idleTimeoutForInitialStore
to allow to force an initial store
2019-01-19 12:07:26 +01:00
Tobias Koppers e4a5e59570 add cache.idleTimeout option to delay cache storing 2019-01-19 11:47:53 +01:00
Tobias Koppers aaf85dbd1c add output.futureEmitAssets
add a new version of emitting assets which allows to free memory of Sources with the trade-off of disallowing reading asset content after emitting

It also uses Source.buffer when available.
2019-01-17 13:33:27 +01:00
Tobias Koppers 12436bf53e add chunkRelations to stats config 2018-12-23 10:04:23 +01:00
Tobias Koppers 5c81bc1ce3 add preset option to schema 2018-12-23 10:04:19 +01:00
Tobias Koppers 1b402bcae1 Merge tag 'v4.28.0' into next
4.28.0
2018-12-19 14:05:17 +01:00
Ilya Kantor a9d465f183 IgnorePlugin: add context argument to checkResource, deprecate checkContext 2018-12-18 11:27:06 +03:00
Tobias Koppers 6c00d3676e
Merge pull request #8484 from webpack/feature/split_chunks_max_size
Add maxAsyncSize and maxInitialSize for SplitChunks
2018-12-16 18:44:15 +01:00
Florent Cailhol b916ff1491 Improve SplitChunksPlugin typings 2018-12-12 10:49:16 +01:00
Florent Cailhol e06b4853d6 Add compiler typings 2018-12-12 10:26:53 +01:00
Florent Cailhol 2a10b12e09 Add maxAsyncSize and maxInitialSize options 2018-12-11 20:47:50 +01:00
Florent Cailhol 760b1da9f3 Add maxInitialSize and maxAsyncSize options 2018-12-10 21:05:39 +01:00
Tobias Koppers 0d2faa0d0a
Merge pull request #8460 from webpack/refactor/node_polyfills
Do not polyfill node bindings by default
2018-12-08 12:23:24 +01:00
Tobias Koppers 8281667668 improve ids for Long Term Caching
add deterministic chunk ids and make it default
StatsTestCases no longer need to explicitly use natural ids as the defaults are deterministic now too
add concept of id name hints for chunks
add `idHint` option to splitChunks to provide a hint
deduplicated code from different id plugins to IdHelpers
improve behavior of named ids in case of conflicts
remove `name: true` and `automaticNamePrefix` from splitChunks it's not as good as expected
improve named chunk ids to show root modules
2018-12-07 12:26:35 +01:00
Florent Cailhol 002128c288 Do not polyfill node bindings by default 2018-12-07 08:58:26 +01:00
Tobias Koppers e5e0f44e29 add algorithm to extract graph roots
show only graph roots in chunks by default
2018-12-06 20:57:04 +01:00
Tobias Koppers 30a68b20c7 support different size types in SplitChunksPlugin 2018-12-05 20:23:40 +01:00
Tobias Koppers 0ff1a4f8f8 Merge tag 'v4.27.0' into next
4.27.0
2018-12-04 11:02:26 +01:00
Tobias Koppers 9d91861592 Refactor HMR for runtime modules
fixed a few HMR bugs
allow other module types for HMR
made HMR more flexible
2018-11-29 16:22:29 +01:00
Florent Cailhol 586b884ae3 Remove concord support 2018-11-29 08:01:21 +01:00
shaw 70b9a1b0b7 fix parameter missing when plugin type is a funtion 2018-11-26 22:37:08 +08:00
Florent Cailhol caefde17ab Remove devtoolLineToLine and lineToLine options 2018-11-12 14:26:31 +01:00
Tobias Koppers 8cf1cdb74f Merge tag 'v4.25.0' into next
4.25.0
2018-11-05 10:27:45 +01:00
Tobias Koppers 0293c3a5ee
Merge pull request #8279 from smelukov/support-entry-progress
ProgressPlugin: support progress by entry points
2018-11-05 08:55:30 +01:00
Tobias Koppers 6be1411838 move schema into definitions 2018-11-04 10:41:12 +01:00
Tobias Koppers 64e3826067 use flags to show different parts of the progress message
refactor activeModules to Set for performance reasons
2018-11-04 10:33:14 +01:00
Michael Ciniawsky 8d741fbb0e refactor(BannerPlugin): unify `filename` handling
BREAKING CHANGE: removes `basename` && `query` params (`options.banner`)
2018-11-01 20:23:09 +01:00
Tobias Koppers 02ba24aca8 add a `cache` option to control the resolve cache 2018-10-31 13:55:28 +01:00
Tobias Koppers a594f9884c add another loglevel to the persistent cache 2018-10-30 09:54:45 +01:00
Tobias Koppers 590772b934 add packed store mode 2018-10-30 09:54:40 +01:00
Sergey Melyukov aa8cb0fab7 ProgressPlugin: refactoring 2018-10-29 15:49:31 +03:00
Tobias Koppers 7b85f99a97 improve loglevel option 2018-10-17 21:25:41 +02:00
Tobias Koppers a852828279 add persistent caching prototype 2018-10-17 21:25:39 +02:00
Tobias Koppers 518104b3fb Merge tag 'v4.21.0' into next
4.21.0
2018-10-17 20:38:00 +02:00
Florent Cailhol 7669104f71 Deprecate moduleIds=hashed in favor of moduleIds=deterministic
Also remove moduleIds=total-size
2018-10-12 17:14:16 +02:00
Naveen Marella 71f9230383 Adding format option for Dll Plugin to get a formatted manifest json. 2018-10-03 09:48:29 -06:00
Evyatar 5edea62e35 fix_contains_typo 2018-09-27 19:02:34 +03:00
Eemeli Aro b624d167a5 Add "amd-require" libraryTarget, resulting in a require() wrapper 2018-09-26 21:46:16 +03:00
Tobias Koppers 17044bf9c6 Merge tag 'v4.20.0' into next
4.20.0
2018-09-25 16:20:42 +02:00
Tobias Koppers 19ff6f8171 fix issues with absolutePath, allOf and anyOf
make DllReferencePlugin schema more expressive
typing fixes
2018-09-21 12:25:25 +02:00
Tobias Koppers 72c63ba91c fixes for RegExp in schema 2018-09-21 12:25:09 +02:00
Tobias Koppers 01741d4fae fix plugin schemas and give them names 2018-09-21 12:25:07 +02:00
Tobias Koppers 1456ab433e improve schema 2018-09-21 12:25:05 +02:00
Tobias Koppers b52d9a2e16 fixup: output options 2018-09-21 12:25:04 +02:00
Tobias Koppers ec62512682 reorganize webpack options schema 2018-09-21 12:25:04 +02:00
Tobias Koppers 53c2f82de7 improve schema to be able to use it 2018-09-21 12:24:58 +02:00
Tobias Koppers 659c46223b add tooling to sort schema properties 2018-09-21 11:54:35 +02:00
Tobias Koppers c7681825f8 fix issues with absolutePath, allOf and anyOf
make DllReferencePlugin schema more expressive
typing fixes
2018-09-21 11:04:36 +02:00
Tobias Koppers 8c31f2a708 fixes for RegExp in schema 2018-09-21 11:04:33 +02:00
Tobias Koppers a91f7366dc fix plugin schemas and give them names 2018-09-21 11:04:26 +02:00
Tobias Koppers b6e81cd00e improve schema 2018-09-21 11:04:17 +02:00
Tobias Koppers 49a271d9a8 fixup: output options 2018-09-21 11:04:15 +02:00
Tobias Koppers 3a896c96b6 reorganize webpack options schema 2018-09-21 11:04:12 +02:00
Tobias Koppers 64b27537da improve schema to be able to use it 2018-09-21 11:04:10 +02:00
Tobias Koppers 20d9cca01f add tooling to sort schema properties 2018-09-21 11:04:07 +02:00
Tobias Koppers 56c613a669 add moduleIds deterministic for simpler long term caching 2018-09-18 17:49:19 +02:00
Tobias Koppers 19d60ba0cd Merge tag 'v4.19.1' into next
4.19.1
2018-09-18 10:13:54 +02:00
Ruben Verborgh 3aef0e5844 Allow array as value in externals object.
Fixes https://github.com/webpack/webpack/issues/8041.
2018-09-17 19:30:11 +02:00
Tobias Koppers b4860ccebb refactor chunk id plugins 2018-09-05 14:28:52 +02:00
Tobias Koppers 51a13926ad Merge tag 'v4.17.2' into next
4.17.2
2018-09-03 20:06:19 +02:00
Tobias Koppers b87e93221b add type option to cacheGroup to select by module type 2018-09-03 10:36:24 +02:00
Tobias Koppers 1b886ee342 improve prettier and lint config and performance 2018-08-24 16:57:16 +02:00
Tobias Koppers c21d59f783 Merge tag 'v4.17.0' into next
4.17.0
2018-08-21 11:02:16 +02:00
Kevin Purnelle 6235e99248 feat(IgnorePlugin): allow user to provide his own check functions
The user can provide checkResource and checkContext functions that
will be called with current resource or context respectively.

These functions should return a boolean to decide whether the module
should be ignored or not.

Now the constructor can accept a single option object.

```
const resourceRegExp = /a_regex/
const contextRegExp = /another_regex/

// before:
new webpack.IgnorePlugin(resourceRegExp, contextRegExp)

// alternative:
new webpack.ignorePlugin({resourceRegExp, contextRegExp})
```

Note that from Webpack 5, only passing an object will be allowed,
so we could encourage people to migrate already.
2018-08-14 17:20:10 +02:00
Florent Cailhol a945054079 Hide modules that are not emitted in stats 2018-08-09 20:22:09 +02:00
Tobias Koppers 5e72a6505a remove deprecated optimization options
and update test cases
2018-07-16 10:32:02 +02:00
Ed Morley 8fcecf38b0 Correct moduleIds schema description
Fixes the typo in #7686.
2018-07-13 13:27:39 +01:00
Sebastian Werner 9d7764aec5
Relaxed type check for hashDigest to allow other non NodeJS-native digest methods e.g. base62. 2018-07-12 12:40:08 +02:00
Tobias Koppers 3366421f17
Merge pull request #7663 from webpack/feature/automatic-name-prefix
automaticNamePrefix and name merging bugfix
2018-07-10 20:45:52 +02:00
Tobias Koppers 3fc4eb752f add new options moduleIds and chunkIds
deprecate namedModules, hashedModuleIds, namedChunks
add a lot of TODOs for webpack 5
split OccurenceOrderPlugin into separate plugins for modules and chunks
add NaturalChunkOrderPlugin and enable it in development
2018-07-09 15:06:19 +02:00
Tobias Koppers 14968acc00 add automaticNamePrefix option
allow automaticNameDelimiter on cacheGroup level
2018-07-05 14:13:13 +02:00
Tobias Koppers fb2c24bf76 add `splitChunks.maxSize` option
add `splitChunks.fallbackCacheGroup`
add `splitChunks.hidePathInfo`
move `contextify` into utils
add some types
2018-07-04 10:45:02 +02:00
Tobias Koppers 5c604f93f6
Merge branch 'master' into feat-implement-option-for-hashed-module-ids-plugin 2018-06-07 14:21:09 +02:00
Tobias Koppers 8e3be48da4 allow to disable wasm import mangle
disable it by default (temporary)
2018-06-05 23:49:02 +02:00
Tobias Koppers 78b31936c3 add checkWasmTypes flag, enabled it only in production 2018-06-04 20:14:08 +02:00
evilebottnawi c222a6f33b feat: implement option for `HashedModuleIdes` plugin 2018-05-25 16:41:20 +03:00
Aliaksei Sapach 6c0c52558c feat: support tree shaking in DllPlugin
This change introduces a new `entryOnly` flag to the DllPlugin options which limits the exposed modules to only those configured as entry points. This allows module concatenation and dead code removal optimizations to take place.
2018-05-18 22:57:29 +03:00
Philipp Klein d6efad856b Allow serve property in webpack configuration
The server property is used to configure webpack-serve
(https://github.com/webpack-contrib/webpack-serve).
Also adapt tests.

Fixes #7306
2018-05-15 16:12:54 +02:00
Tobias Koppers 687c03869f
Merge pull request #7270 from webpack/feature/banner_function
Allow banner to be specified as a function
2018-05-14 20:14:59 +02:00
Florent Cailhol 8488b882a4 Allow banner to be specified as a function 2018-05-10 18:19:32 +02:00
byzyk d50f00db87 fix: allow array of strings for library.root 2018-05-03 15:48:17 +04:00
SlavaB 71a12c8bc1 Add tests for namedChunkGroups 2018-04-24 19:01:02 +03:00
Tobias Koppers 8d8da4cdff Merge branch 'master' into bump_prettier 2018-03-29 11:48:02 +02:00
Tobias Koppers 0f70fcb99f
Merge pull request #6791 from storybooks/spilt-chunks-selector
Support selector function as optimization.splitChunks.chunks option
2018-03-29 11:40:07 +02:00
Tobias Koppers b30de38eb5
Merge pull request #6672 from EugeneHlushko/fix/6639
fix(bug): chunkFilename as function doesn't work
2018-03-29 11:01:36 +02:00
Hypnosphi 1677144faf Allow filter function in `optimization.splitChunks.cacheGroups[name].chunks` 2018-03-26 22:18:46 +03:00
Florent Cailhol f1092ad516 Update prettier toolchain 2018-03-26 16:56:10 +02:00
Hypnosphi f804ff06be Support selector function as optimization.splitChunks.chunks option 2018-03-18 16:51:06 +03:00
Tobias Koppers f99f96da6b rename variable, use includes instead of indexOf 2018-03-18 09:43:28 +01:00
byzyk b61540e852 fix prettier 2018-03-18 10:00:55 +04:00
Bohdan Khodakivskyi b8b11bf600
Merge branch 'master' into fix/6742 2018-03-18 09:58:49 +04:00
Fernando Montoya 57ea856cc8
misc: Add schemas to ESLint and Prettier commands 2018-03-15 12:47:24 +01:00
byzyk f513065227 fix: throw validation error when exclamation mark was found in path 2018-03-15 12:24:40 +04:00
byzyk a515918bbe wip: check if ! is present in path 2018-03-14 18:54:13 +04:00
byzyk 13b80be3ba fix: make excludeModules accept booleans 2018-03-14 09:52:16 +04:00
Manuel Bauer bda8d52810 Added chunkFilenameDelimiter option for SplitChunksPlugin: Applied requested changes 2018-03-12 10:07:31 +01:00
Manuel Bauer 36db321e9c Added chunkFilenameDelimiter option for SplitChunksPlugin 2018-03-09 10:12:23 +01:00
Tobias Koppers ae2ae4e504
Merge pull request #6640 from clarkdo/module-assets
fix: module assets is in buildInfo
2018-03-05 16:31:17 +01:00
EugeneHlushko 73d418a5a5 fix(bug): chunkFilename as function doesn't work 2018-03-05 12:27:08 +02:00
Clark Du 81235e1331 Add stats.moduleAssets to show assets inside modules in the Stats 2018-03-04 13:39:05 +08:00
Tobias Koppers ecb65aa75a allow to configure filename for splitted chunks
#6598
2018-03-02 10:14:25 +01:00
Josh Soref 64fa1d4e76 spelling: extensions 2018-02-26 02:28:31 +00:00
Josh Soref 8728659ada spelling: concord 2018-02-26 02:27:08 +00:00
Tobias Koppers f34fe5383f
Merge pull request #6532 from webpack/bugfix/issue-6426-name
allow name: false for splitChunks
2018-02-21 14:21:51 +01:00
Michael Ciniawsky 8a888cf416 fix(schemas/plugins): rm unnecessary `id`'s 2018-02-21 06:58:39 +01:00
Tobias Koppers dcc0997605
Merge pull request #6523 from webpack/next
Merge a few PR that were merged to be wrong branch
2018-02-20 15:13:51 +01:00
Tobias Koppers 244d27a42d improve way of getting combinations of chunks
we no longer require a complexity limit -> maxComplexity removed
2018-02-17 10:16:32 +01:00
Tobias Koppers 1e73752fb2 improve chunk splitting
by also trying to select combinations of module chunks
(limited by complexity)
fix size ordering (was reversed)
add chunk cound ordering
2018-02-17 07:01:00 +01:00
EugeneHlushko f33cf76608 Improvement: add schema for profiling plugin options, remove todo item: add docs, rename option 2018-02-14 10:29:29 +02:00
EugeneHlushko 97cd2dde70 Improvement: add schema for profiling plugin options, remove todo item: abs path to false 2018-02-14 09:49:15 +02:00
EugeneHlushko fb4b275dc9 Improvement: add schema for profiling plugin options, remove todo item 2018-02-13 19:13:07 +02:00
Tobias Koppers 9599e4eb61 fix typo: mergedDuplicateChunks -> mergeDuplicateChunks 2018-02-13 12:41:30 +01:00
Tobias Koppers 425a961bb6 allow name: false for splitChunks
#6426
2018-02-06 21:50:23 +01:00
Tobias Koppers b50a5b61c4
Merge pull request #6384 from benthemonkey/next
Add "single" option to RuntimeChunkPlugin
2018-02-05 17:35:55 +01:00
Ben Rothman 5ee61f8910 add "multiple" string option for runtimeChunk config 2018-02-01 11:11:16 -06:00
Tobias Koppers 9fde04d299 handle single option in options defaulter
change runtime chunk naming schema
2018-02-01 17:53:15 +01:00
Tobias Koppers 97d1a7bd06
Merge pull request #6404 from Hoten/feat-add-build-at
Add 'build at' time to webpack output
2018-02-01 17:32:37 +01:00
Francis John 99f100dae7 Add property to config schema 2018-01-31 20:17:30 -08:00
Connor Clark 5266a30808 add builtAt stats option. use locale string functions 2018-01-30 17:34:08 -08:00
Ben Rothman c26c872bb2 add "single" option to RuntimeChunkPlugin 2018-01-26 22:03:56 -06:00
Tobias Koppers b28435eb32 make default cache group explicit
add priority
using cacheGroups doesn't override default cache groups
2018-01-20 13:13:10 +01:00
Tobias Koppers 18ae73dad4 Refactor chunk graph
Chunks are now always in ChunkGroups
ChunkGroups have parents and children, Chunks no longer have this
AsyncDependenciesBlocks point to a ChunkGroup instead of a list of chunks
Entrypoint is now a ChunkGroup (extends from it)
move stuff graph modification methods into GraphHelpers
Change chunk id recording to source-based
Chunks have parents, siblings and children in Stats
rename AutomaticCommonsChunksPlugin to SplitChunksPlugin
add request property to origin (ChunkGroup)
remove moveToParent from AggressiveMergingPlugin
fix issues with AggressiveSplittingPlugin
remove CommonsChunkPlugin
add optimization.runtimeChunk (RuntimeChunkPlugin)
fix a filename bug for initial chunks
remove extract-text-webpack-plugin from test suite
add DebugHash to help debugging hash issues
fix issues with entry modules in different chunk as runtime
redo optimization.splitChunks options
Compilation.entrypoints is now a Map
Compilation.chunkGroups has been added
remove some unittests
update examples
update tests with CommonsChunkPlugin
2018-01-19 19:21:30 +01:00
Tobias Koppers acdabb1427 linting, comment and minor improvements 2018-01-10 19:22:25 +01:00
Tobias Koppers 85acfeb1c2 allow to use new options minSize, maxRequests 2018-01-10 18:58:27 +01:00
Tobias Koppers b34663cb2d add more config options
fix bugs
2018-01-10 18:58:27 +01:00
Tobias Koppers 417044f065 add AutomaticCommonsChunksPlugin
enable it by default for async chunks
add options for initial chunks
2018-01-10 18:58:26 +01:00
Tobias Koppers 45f8a28b44 Merge branch 'master' into next
# Conflicts:
#	lib/JsonpMainTemplatePlugin.js
#	lib/NoEmitOnErrorsPlugin.js
2018-01-04 20:59:34 +01:00
Tobias Koppers ff908decb3
Merge branch 'next' into feature/add-entry-default-value 2018-01-03 15:41:45 +01:00
Tobias Koppers 6d0923effb
Merge pull request #6200 from webpack/feature/output-global-object
add output.globalObject configuration option
2018-01-02 14:13:12 +01:00
Tobias Koppers 2e916e6205 add output.globalObject to schema 2018-01-02 09:46:29 +01:00
Neehar Venugopal 06c19e9565 add support for new output option jsonpScriptType 2017-12-31 17:13:59 +05:30
Sean Larkin 4b381b1eaa Merge branch 'next' into feature/add-entry-default-value 2017-12-30 18:23:53 -06:00
Tobias Koppers 1886b7a5cb Merge branch 'master' into next
# Conflicts:
#	bin/webpack.js
#	lib/Compilation.js
#	yarn.lock
2017-12-29 11:17:10 +01:00
Tobias Koppers d95f93f8cb add output.globalObject configuration option
remove deprecated atom and electron target
add self libraryTarget
add self external type
2017-12-27 18:46:37 +01:00
Sean Larkin 1fdc37764e
Merge branch 'next' into feature/add-entry-default-value 2017-12-22 14:50:42 -08:00
jaketodaro fb4070442a support functions for templated string config properties
Any config property that accepts a templated string (e.g. '[name].js')
can now accept a function that returns a templated string.

```
{
    output: {
        filename: () => '[name].js'
    }
}
```

Closes #6098
2017-12-22 07:28:16 -08:00
Tobias Koppers 84a3b2cd17
Merge pull request #6146 from EugeneHlushko/feature-xxhashjs
Feature: Non-crypto hashing algorithm and opt-in through config
2017-12-21 08:48:52 +01:00
Tobias Koppers ba00d7495a fix unnecessary module concatenation
allow to display nested modules in stats
2017-12-20 20:35:16 +01:00
EugeneHlushko 307566a7a1 Feature: Add an option to provide output.hashFunction as a function 2017-12-19 19:53:08 +02:00
Sean Larkin 5e8700f5c5 feat(defaults): add fixed defaults 2017-12-18 12:18:07 -08:00
Jason Staten af0733fed6 Add description for `mode` option. Fixes #6135
Changed from being a copy of `amd` description.
2017-12-15 14:25:21 -07:00
Tobias Koppers 5cbd6b20dd allow to set sideEffects from rules 2017-12-14 13:08:57 +01:00
Tobias Koppers 2148f556a4 Enable minimizing in production mode 2017-12-14 00:06:56 +01:00
Tobias Koppers 758f1eb464 Merge branch 'master' into next 2017-12-12 14:45:09 +01:00
Rowan Oulton 6f85f9b386 Add ident propertry to list of permissible properties of Rule.use
As per https://webpack.js.org/configuration/module/#useentry
2017-12-07 09:47:55 -08:00
Tobias Koppers eff2f57fa5 fix merge issue (missing properties in schema) 2017-12-04 14:54:50 +01:00
Tobias Koppers bfa4b49858 Merge branch 'master' into next 2017-12-04 14:36:07 +01:00
Tobias Koppers fabe631a83 Only generate portable records when needed 2017-12-01 11:27:03 +01:00
Tobias Koppers a71284eb79 Add missing watchOptions properties to schema 2017-11-30 15:55:37 +01:00
Tobias Koppers 9b8a1322c5 Upgrade enhanced-resolve version 2017-11-29 16:34:49 +01:00
Tobias Koppers d7184b281c add new namespace option to schema 2017-11-28 10:04:57 +01:00
Tobias Koppers dae9de6595 Merge branch 'next' into feature/validate-plugin-options
# Conflicts:
#	lib/SourceMapDevToolPlugin.js
#	lib/optimize/AggressiveSplittingPlugin.js
#	yarn.lock
2017-11-28 09:59:59 +01:00
Tobias Koppers 9870165069
Merge pull request #6008 from EugeneHlushko/bugfix-issue-6003
Lookup the provided plugins on the options, throw for invalid arguments.
2017-11-27 07:48:07 +01:00
EugeneHlushko 0c9707f832 Add options.plugins schema validation: CR changes on wording 2017-11-26 13:42:18 +02:00
EugeneHlushko 70c50ea8f1 Add options.plugins schema validation, ensure apply method is present. Add tests 2017-11-24 18:54:48 +02:00
Tobias Koppers 2201b860a5 Add mode option and choose defaults depending on mode
add optimization options
use development mode for watch/hot/config tests
use production mode for integration/stats tests
create output directory if not existing
move __esModule to runtime
fix dependency behavior for cases without usedExports
2017-11-24 08:17:17 +01:00
Tobias Koppers 5840039701 add chunkCallbackName from WebWorker to schema 2017-11-21 12:57:11 +01:00
Tobias Koppers 3ded46bed4 fix typo 2017-11-20 13:04:33 +01:00
Tobias Koppers 0a535b2a4f fix required properties 2017-11-20 10:38:48 +01:00
Tobias Koppers d9d19596e5 Added documentation and fix errors 2017-11-20 10:17:34 +01:00
Sergey Petushkov 7950e3da5d Fix lint errors 2017-11-19 13:31:33 +01:00
Sergey Petushkov a07626aa71 Fix indentation 2017-11-19 11:45:15 +01:00
Sergey Petushkov ac619960ac Merge remote-tracking branch 'upstream/master' into feature/validate-plugin-options
Conflicts:
	schemas/webpackOptionsSchema.json
2017-11-18 09:35:37 +01:00
Tobias Koppers 5e39ec46ee Allow to override resolve configuration 2017-11-18 08:12:35 +01:00
Tobias Koppers a53672d1a2 Merge branch 'master' into next
# Conflicts:
#	lib/EvalSourceMapDevToolModuleTemplatePlugin.js
#	lib/dependencies/HarmonyDetectionParserPlugin.js
#	lib/dependencies/HarmonyImportDependency.js
#	package.json
#	schemas/webpackOptionsSchema.json
#	test/Validation.test.js
2017-11-17 16:03:46 +01:00
Tobias Koppers 982e44f670
Merge branch 'next' into master 2017-11-16 14:17:29 +01:00
Tobias Koppers e481ea53fd add linting for schemas
add missing descriptions in schema
2017-11-16 13:15:15 +01:00
Sergey Petushkov cdd593b847 Rename schemas; Make imports less verbose 2017-11-12 09:48:08 +01:00
Sergey Petushkov dcc09ee653 Run beautify on schemas 2017-11-12 09:48:08 +01:00
Sergey Petushkov 1065a6e46c Refactor plugins to use schema-utils; Remove unused 2017-11-12 09:48:08 +01:00
Sergey Petushkov 744dbe9b95 Add validations to plugins 2017-11-12 09:48:08 +01:00
Tobias Koppers 00f2b5ede7 advanced module type refactoring
added json type
.mjs default to javascript/esm type
adjusted parser plugins to react on module type
2017-11-11 19:27:19 +01:00
Tobias Koppers 4597805222
Merge branch 'next' into master 2017-11-11 19:00:05 +01:00
Tobias Koppers 41a1d602e1 added WebAssembly Proof of Concept 2017-11-10 09:17:11 +01:00
Tobias Koppers 122e7dc649 Merge branch 'master' into next
# Conflicts:
#	package.json
#	test/HarmonyModulesHelpers.unittest.js
#	test/StatsTestCases.test.js
#	yarn.lock
2017-10-19 21:31:35 +02:00
Stephan Badragan f925032d5a adding `output.devtoolNamespace` option
When loading multiple libraries built with webpack, you can run into
collisions of the sourcemap file paths. For examle, both have
"webpack:///src/index.js".

This change addresses the problem by introducing a new output option
`output.devtoolNamespace` which defaults to `output.library` when
not specified. The defaults moduleFilenameTemplates in all the
sourcemap plugins have been modified to start with:
"webpack://[namespace]/...", where [namespace] will be replaced by
the `output.devtoolNamespace`.

Notice that there are only two slashes following "webpack:" now.
This is to make it behave just as before when not building with a
namespace. When building with a namespace you only get the two
slashes, but from what I've seen the chrome dev tools only care
about the first 2 slashes anyways.

Discussed with sokra here:
https://github.com/webpack/webpack/issues/5767
2017-10-18 01:14:40 +01:00
Tobias Koppers 168f92330e Merge pull request #5842 from jbottigliero/bugfix/stats.all
adds stats.all option the the webpackOptionsSchema
2017-10-17 21:31:28 +02:00
Joe Bottigliero c3d77bbcf3 Update webpackOptionsSchema.json
- adds `"type": "boolean",` for `stats.all`
2017-10-17 10:47:45 -05:00
Joe Bottigliero eb00961796 adds stats.all option the the webpackOptionsSchema 2017-10-17 10:31:38 -05:00
Tobias Koppers c4bb0f410b add missing stats keys
fixes #5839
2017-10-17 16:43:29 +02:00
Tobias Koppers 82f42e2c67 Merge branch 'master' into next 2017-10-17 12:38:38 +02:00
Joe Bottigliero 576187541a [fix] webpackOptionsSchema.json
- fixes failing stats tests by adding various options to the webpackOptionsSchema.json as well as fixing invalid options provided in test configurations.
2017-10-13 21:29:35 -05:00
Joe Bottigliero e0d4501fab [fix] webpackOptionsSchema
- Updates webpackOptionsSchema "stats" object to include "additionalProperties: false"
- Adds missing stats options
- Adds test for ensuring new stats options fail the schema check (if not included)
2017-10-13 17:12:24 -05:00
Tobias Koppers 4105297de6 Merge branch 'next' into deprecation/webpack-3 2017-09-11 11:26:44 +02:00
Tobias Koppers f9bf8a9085 Limit the number of parallel processed modules
fixes #3164
fixes #3166
2017-08-11 16:11:17 +02:00
Ricky Lippmann 05f7b2d5b7 Add excludeModules and allow multiple options as fallbackchain. 2017-07-27 18:33:10 +02:00
Mike Sherov bdddee2b91 Ignore context in resolve caching when resolve or resolveLoader plugins are provided. 2017-06-28 08:37:58 -04:00
Tobias Koppers 3e3b7489b4 Merge pull request #4883 from AndersDJohnson/library-target-umd-names-per-target
feat: library target UMD supports names per target
2017-06-21 22:51:27 +02:00
Tobias Koppers 9cf6d51df6 disallow module.loaders 2017-06-14 14:42:31 +02:00
Tobias Koppers 7f8d5b2aa5 Merge branch 'master' into next 2017-06-05 11:07:44 +02:00
Tobias Koppers 7719cc6dd7 Merge pull request #4995 from jchip/master
Support turn off  NodeSourcePlugin with false option
2017-06-05 09:55:43 +02:00
Joel Chen 8fec262c8c Support turn off NodeSourcePlugin with false option 2017-06-02 23:04:23 -07:00
Suman 6c2f378fac Adding function support to noParse 2017-06-02 20:28:54 -04:00
Tobias Koppers 302289ce24 Merge branch 'master' into next 2017-06-02 16:28:22 +02:00
Tobias Koppers de8fc51a6f allow to export any property/export of the bundle
fixes #3929
2017-06-02 14:52:41 +02:00
Tobias Koppers 0f16dd95b1 fixes incorrect CLI stats output
add "detailed" preset
clean up presets to do more useful stuff

fixes #4141
fixes #4118
2017-06-01 15:03:26 +02:00
Anders D. Johnson 2ec4b5cd19
fix: update schema to support library as object 2017-05-29 13:49:34 -05:00
Tobias Koppers d8539561fd add optimization bailout info
track optimization bailout in concat plugin
2017-05-28 15:25:07 +02:00
Tobias Koppers d967a4623c add `module.strictThisContextOnImports` option
to allow spec-comforming behavior this context on
called imported harmony functions
2017-05-21 09:23:35 +02:00
restrry f2264e4202 make chunkLoadTimeout option cofigurable 2017-05-11 10:41:38 +02:00
Even Alander 958156ae42 moduleTrace added to webpackOptionsSchema.json 2017-04-29 19:43:15 +02:00
Samuel Reed 805c9fadf0
fix missing `hashSalt` from options schema 2017-04-15 11:39:49 -04:00
Tobias Koppers 7ee479579e Merge pull request #4381 from timse/add-suppressWarnings-functionality
Add suppress warnings functionality
2017-04-03 12:09:58 +02:00
Tobias Koppers 56d09ab65c Merge pull request #4533 from michael-ciniawsky/schema
fix(schema/absolutePaths): make absolute paths case insensitive
2017-03-24 22:28:10 +01:00
Tobias Koppers 10c44e5a94 fix extra newline in validation 2017-03-22 12:24:18 +01:00
Michael Ciniawsky c390700429 fix(schema/absolutePaths): make absolute paths case insensitive 2017-03-22 07:14:31 +01:00
Tim Sebastian 0dbb5958a1 add warnings filter option to options schema 2017-02-25 15:54:47 +11:00
Joe Haddad fa47a39107
Add strictExportPresence option 2017-02-22 21:06:43 -05:00