Mohsen Azimi
a0e1ad920e
Enable noImplicitThis TypeScript compiler option
2018-07-05 08:07:46 +03:00
Tobias Koppers
0a06f19fd8
Merge tag 'v4.15.0' into next
...
4.15.0
2018-07-04 22:19:50 +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
1ad71e01f9
add helpful error when importing wasm in initial chunk
2018-07-02 16:18:49 +02:00
Sean Larkin
2d1cd74d37
Merge branch 'master' into feature/type-compiler-compilation-save
2018-06-29 11:53:40 -07:00
Tobias Koppers
ad8f496745
arrow functions, remove or improve eslint-disable comments
2018-06-27 13:48:13 +02:00
Florent Cailhol
e763d87960
Remove useless checks on ChunkGroup
2018-06-27 11:40:24 +02:00
Florent Cailhol
91663f19a2
Remove deprecated APIs
2018-06-27 10:08:12 +02:00
Tobias Koppers
a41a0fb799
use correct Hash interface
2018-06-25 16:01:57 +02:00
Sean Larkin
968edbf77d
fix(types): fix errors and linting errors
2018-06-21 14:38:17 +03:00
Sean Larkin
c3ebef7f25
Merge branch 'master' into feature/type-compiler-compilation-save
2018-06-21 11:07:33 +03:00
Tobias Koppers
3e778b85c7
fix minor type issues and linting
2018-06-20 12:04:53 +02:00
Mohsen Azimi
4859c926ad
CR comments - remove TS syntax (one last type error)
2018-06-19 15:32:15 -07:00
Mohsen Azimi
1d39cce941
Type SortableSet
2018-06-06 08:11:30 -07:00
Nathan Shively-Sanders
c97107367a
Fix template tag syntax
...
In 2.9 and earlier, Typescript allowed braces around the name introduced
by the `@template` tag, even though this syntax is non-standard. In 3.0,
Typescript introduces a more complex `@template` syntax that uses braces
for specifying the constraint of a type parameter:
```js
/** @template {Constraint} T -- By analogy with param syntax:
* @param {T} name
*/
function f(name) { ... }
```
That means that the syntax `/** @template {T} */` is illegal. This PR
fixes the uses of the `@template` tag ahead of Typescript 3.0 as well as
typescript@next.
2018-06-04 14:22:20 -07:00
Tobias Koppers
db668b7549
move fake document to ConfigTestCases
...
minor style issues
add test case
2018-06-04 17:49:55 +02:00
Michael Loughry 👨💻
0d21ce197c
Address most of Sokra's comments
...
- [x] Don't emit prefetch code if not needed
- [x] Only affect StatsTestCase dealing with prefetching
- [x] Fix existing prefetch test case
- [ ] Trigger prefetch after startup code runs
- [ ] Add new test(s)
2018-06-01 10:51:39 -07:00
Sean Larkin
1bae93852a
Merge branch 'master' into feature/type-compiler-compilation-save
2018-05-30 19:35:36 -07:00
Michael Loughry 👨💻
8a995da749
Split the map among the chunks
2018-05-30 15:36:50 -07:00
Michael Loughry 👨💻
685cbcdf54
Initial rework per sokra's suggestion
2018-05-30 14:36:53 -07:00
Florent Cailhol
2a9452e51b
Add brackets for multiline if/for statements
2018-05-29 15:45:44 +02:00
Tobias Koppers
3072378892
bugfixes and corrections
2018-05-15 15:04:40 +02:00
Sean Larkin
761d73b4e7
chore(types): add Compiler and Compilation type support
2018-05-15 15:04:38 +02:00
Sean Larkin
6a919ba8dd
chore(types): add type support for Template base class
2018-05-03 21:37:34 -07:00
Sean Larkin
f1618aed04
chore(Chunk): add type annotations for Chunk
2018-05-03 16:17:58 -07:00
Alejandro Madariaga Angeles
22b44463ac
change Chunk.isRuntimeOnly to Chunk.preventIntegration
2018-04-25 12:45:53 -05:00
Alejandro Madariaga Angeles
3b6d7d873e
fix bug where sometimes the runtime would not be present on output
2018-04-23 17:30:14 -05:00
Tobias Koppers
3a5fda909f
Merge pull request #7062 from webpack/bugfix/issue-6931
...
fix bug which prevented some chunks to show up in Chunk.getAllAsyncChunks
2018-04-17 11:41:50 +02:00
Tobias Koppers
58ba91d78b
fix bug which prevented some chunks to show up in Chunk.getAllAsyncChunks
...
fixes #6931
2018-04-17 11:04:06 +02:00
Tobias Koppers
8e2e19ba50
fix unstable sorting of ChunkGroups and add test
2018-04-17 09:36:26 +02:00
Tobias Koppers
205ca623e7
fix reversed order in Chunk.compareTo
2018-04-17 09:35:57 +02:00
Tobias Koppers
17eb5b4700
rename priority to order
2018-04-16 18:00:34 +02:00
Tobias Koppers
9cb1a66317
add support for link preload/prefetch
...
`import(/* webpackPrefetchPriority: 10 */ "...")`
`import(/* webpackPreloadPriority: 10 */ "...")`
2018-04-16 11:29:25 +02:00
Tobias Koppers
296542ed79
add [contenthash] support
2018-03-24 12:08:36 +01:00
Tobias Koppers
f32bd41c52
fix linting
2018-02-25 02:15:37 +01:00
Tobias Koppers
5238159d21
run prettier on existing code
2018-02-25 02:00:20 +01:00
EugeneHlushko
735c8ce9e0
refactor(es6): multiline string, arr.includes, arrow functions in ./lib and ./benchmark
2018-02-17 13:09:35 +02:00
Tobias Koppers
d6816afddf
Merge pull request #6355 from webpack/for_of_loops
...
Use for-of loops instead of forEach
2018-01-24 10:35:58 +01:00
Tobias Koppers
7a1b357aad
Merge branch 'next' into for_of_loops
2018-01-24 09:01:31 +01:00
Tobias Koppers
b7063092b1
Readd removed util module
...
merge issue
2018-01-24 08:47:43 +01:00
Tobias Koppers
ad75e44d02
Merge branch 'next' into remove_v3_deprecated
2018-01-24 08:45:13 +01:00
Tobias Koppers
7de03f2984
Merge pull request #6367 from webpack/deprecate_forEach_map
...
Deprecate forEach* and map* methods
2018-01-24 08:39:59 +01:00
Florent Cailhol
7b8fa112e0
Remove v3 deprecated APIs
2018-01-23 23:25:01 +01:00
Florent Cailhol
d4811b0d37
Use for-of loops instead of forEach
2018-01-23 22:53:18 +01:00
Florent Cailhol
77bb4c0055
Deprecate forEach* and map* methods
2018-01-23 22:19:59 +01:00
Michael Ciniawsky
390fac43b4
fix(lib/Chunk): typo in `getNumberOfGroups` return value
2018-01-23 08:54:19 +01:00
Tobias Koppers
ea609374f7
split Chunk.isInitial into isOnlyInitial and canBeInitial
...
remove includeInitial argument of getChunk(Module)Maps
2018-01-22 12:52:28 +01:00
Tobias Koppers
0206949075
remove unused code
2018-01-21 11:12:36 +01:00
Tobias Koppers
5161d96650
fix bug when comparing name lengths
2018-01-21 11:10:51 +01:00
Tobias Koppers
fabd1abb41
improvements from review by @ooflorent
2018-01-20 11:28:45 +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
7112943ca4
Merge pull request #6298 from EugeneHlushko/refactor/indexof-to-includes
...
Refactor/indexof to includes
2018-01-11 22:45:02 +01:00
EugeneHlushko
2aab060f26
Refactor: indexOf >< checks to includes
2018-01-11 18:58:39 +02:00
Tobias Koppers
c71dabcc0c
allow to set runtime chunk in Entrypoint
...
split keeps runtime chunk in entrypoint
default runtime chunk back to first chunk to keep CCP working
2018-01-10 18:58:28 +01:00
Tobias Koppers
b34663cb2d
add more config options
...
fix bugs
2018-01-10 18:58:27 +01:00
Tobias Koppers
08cd2f0ffe
introduce ChunkGroup for AND in parents
2018-01-10 17:12:03 +01:00
Tobias Koppers
ca1c91c576
Merge branch 'master' into next
...
# Conflicts:
# lib/Chunk.js
# lib/MainTemplate.js
# test/statsCases/commons-chunk-min-size-0/expected.txt
# test/statsCases/commons-plugin-issue-4980/expected.txt
# test/statsCases/named-chunks-plugin/expected.txt
2018-01-04 21:47:33 +01:00
nename0
d1e0bec48e
Fix: the require-ensure only includes non-initial chunks
2018-01-04 19:25:03 +01:00
Jeonghwan Lee
6dd4de57dc
Fix Chunk.prototype.entrypoints setter
2017-12-15 11:26:38 +09:00
Tobias Koppers
beccf941a9
convert algorithm to iterative, use less memory
2017-12-01 11:26:53 +01:00
Tobias Koppers
8363773f3f
only emit wasm runtime code for bundles containing wasm
2017-11-21 12:57:40 +01:00
Tobias Koppers
65e855c636
fix deprecations
2017-11-11 11:27:02 +01:00
Tobias Koppers
41a1d602e1
added WebAssembly Proof of Concept
2017-11-10 09:17:11 +01:00
Tobias Koppers
860da9baaa
Merge branch 'next' into refactor/sets
2017-11-08 21:28:51 +01:00
Tobias Koppers
f7c2f8e470
Update code style to arrow functions
2017-11-08 11:56:01 +01:00
Tobias Koppers
447d85ad79
Merge branch 'next' into refactor/sets
...
# Conflicts:
# lib/ContextModule.js
# lib/NormalModule.js
# lib/optimize/ConcatenatedModule.js
2017-11-08 06:01:24 +01:00
Tobias Koppers
51c572c4f5
refactor more properties to Sets
2017-11-07 09:17:12 +01:00
Tobias Koppers
52bacce0d7
Merge branch 'next' into refactor/cleanup-stuff
2017-11-07 09:15:15 +01:00
Tobias Koppers
0339d4da49
Refactor weird things
...
* Declare used properties in constructor
* Module.(re)building moved into Compilation._(re)buildingModules (Map)
* Make NormalModule.error private
* Move Module.cacheable logic into needRebuild
* More stable implemention of rebuildModule
* addModuleChain waits for Module building finished before returning
* Set built and cacheable flags correctly in Modules
* More portableId into WeakMap
* Add ModuleReason for entrypoints
* cacheable can be true/false/null in Stats
* added Stats module issuerPath
* fixes profile in stats output
2017-11-06 13:16:09 +01:00
Tobias Koppers
1b28c93eaf
renamed methods
2017-11-06 12:15:23 +01:00
Tobias Koppers
bbb66fcca0
bugfix
2017-11-06 11:26:16 +01:00
Tobias Koppers
801138a3b3
allow caching in sortable set and use it
2017-11-03 10:17:08 +01:00
Tobias Koppers
814c894168
Merge branch 'master' into next
...
# Conflicts:
# lib/optimize/CommonsChunkPlugin.js
# test/statsCases/limit-chunk-count-plugin/expected.txt
# test/statsCases/named-chunks-plugin-async/expected.txt
# test/statsCases/optimize-chunks/expected.txt
2017-10-16 10:47:17 +02:00
Tobias Koppers
45756a2291
set chunk reasons symmetrical
2017-10-13 10:44:08 +02:00
Tobias Koppers
07992cf588
fix sorting issue
2017-09-22 17:23:49 +02:00
Tobias Koppers
b316bee0a6
Use SortableSets for Chunk.parents/blocks
2017-09-22 16:38:47 +02:00
Tobias Koppers
53711d5a76
make deprecations more yelling
2017-09-22 14:13:09 +02:00
Tobias Koppers
6bd937d768
make things consitent
2017-09-22 14:07:28 +02:00
Tobias Koppers
6c1831ca21
Merge branch 'next' into use-set-in-chunks
2017-09-22 13:49:03 +02:00
Tobias Koppers
7387c50c3a
change jsonp function to jsonp array push
2017-09-14 08:49:14 +02:00
Tobias Koppers
f6a0d51e6b
Merge branch 'master' into use-set-in-chunks
2017-07-18 09:32:53 +02:00
Steven Hargrove
5f08aa44bd
removed default params for node 4
2017-07-06 16:40:58 -04:00
Steven Hargrove
cadf9f715f
added sortModules method to Chunk class
2017-07-06 16:08:58 -04:00
Tim Sebastian
4c18dbf0d6
make chunk._chunks a sortable set
2017-06-24 11:40:24 +10:00
Tim Sebastian
7e0a6ca287
fix contrains checks, might get obsolete in the future
2017-06-24 11:39:46 +10:00
Tim Sebastian
53f70c7aeb
deprecate chunk.chunks
2017-06-24 11:38:00 +10:00
Tim Sebastian
81e5b7ce4f
refactor usage of this.chunk inside Chunk to use Set API
2017-06-24 11:38:00 +10:00
Tim Sebastian
cedce8d0f5
make this.chunks in Chunk private and turn it into a Set
2017-06-24 11:37:20 +10:00
Tim Sebastian
1a16a3e181
make sort function private
2017-06-19 22:13:44 +10:00
Tim Sebastian
747efcadf9
use SortableSet in chunks
...
use SortableSet to keep "_modules" sorted
2017-06-18 13:57:11 +10:00
Tobias Koppers
b08762b729
optimize optimization plugins
2017-06-01 16:35:07 +02:00
Tobias Koppers
2bd2d2844c
improve a few issues
...
from review by @Kovensky
2017-05-20 14:54:42 +02:00
Tobias Koppers
e1bac32c19
Use a Set to store modules in a chunk
2017-05-16 11:50:50 +02:00
Ali BARIN
a941499889
Update variable declarations according to ES6
2017-03-02 15:09:09 +01:00
Tim Sebastian
f4d8c5f20f
fix inner loop of "remove" method
...
as it is not guaranteed that the the chunk has parents the loop may not be run
this could lead to stale "this" still being a parent of one of its childs.
therefore we have to loop the chunks again.
2017-02-14 21:16:10 +11:00
Tim Sebastian
4438ac9880
remove "removeAndDo" and make usage inline and explicit
2017-02-14 21:16:10 +11:00
Tim Sebastian
9e60f2c302
fixup integratedSize to reflect original functionality
2017-02-14 21:16:10 +11:00
Tim Sebastian
7305593987
rename other to otherChunk
2017-02-14 21:16:10 +11:00
Tim Sebastian
f062f49a70
make clearer what "parents" are
2017-02-14 21:16:10 +11:00
Tim Sebastian
3b4eb0f832
more readable variables
2017-02-14 21:16:09 +11:00
Tim Sebastian
63f0930161
simplify size calculation
...
add "moduleSize" calculator, add multiply and overhead helper
2017-02-14 21:16:09 +11:00
Tim Sebastian
aaee63a500
make variables more readable
2017-02-14 21:16:09 +11:00
Tim Sebastian
dd5eb39dd3
remove unnecessary passing of "this" argument - done via arrow functions
2017-02-14 21:16:09 +11:00
Tim Sebastian
2f58138516
remove unnecessary iteration if b.chunks is not set
2017-02-14 21:16:09 +11:00
Tim Sebastian
9f27e92d42
use replaceChunk and replaceParent in "integrate" method
2017-02-14 21:16:09 +11:00
Tim Sebastian
848b5aeb92
add two helper methods `replaceChunk` and `replaceParent`
...
they take an old item and a new item, remove the old item and add the new one
2017-02-14 21:16:09 +11:00
Tim Sebastian
5fa6caafd6
use method "moveModule" instead of duplicating it when integrating chunk
2017-02-14 21:16:09 +11:00
Tim Sebastian
fc36ac366d
use easier readable variable name in moveModule
2017-02-14 21:16:08 +11:00
Tim Sebastian
779c753baf
transfer add logic for module, block, parent, chunk to prototype
...
bringing the "adder" logic to the prototype might be slighly better performance wise
reuse of logic for add module and block, though they now have one superfluous check (should be negligable though)
2017-02-14 21:16:08 +11:00
Tim Sebastian
071b504a84
merge iteration of parent and sub chunks
...
merge and document iteration over parent and subchunks in remove method
this will slightly increase performance for removing chunks as it only
iterates once over all chunks and parents'
2017-02-14 21:16:08 +11:00
Tim Sebastian
f7e9d5805f
use easier to read variable names
2017-02-14 21:16:08 +11:00
Tim Sebastian
14894f065f
not needed as arrow functions keep "this"
2017-02-14 21:16:08 +11:00
Tim Sebastian
e0da9a8c44
the point of the arrow function is to not need a context passed in
2017-02-14 21:16:08 +11:00
Tim Sebastian
4ea380ff68
no need to add removeAndDo to the context
...
no one else is using it on chunks and `_` indicates its private anyways
2017-02-14 21:16:08 +11:00
Tobias Koppers
8e69a80847
code linting
2017-01-11 12:29:01 +01:00
Will Mendes
a1ffb615ab
refactor(Chunk): upgrade to ES6 ( #3694 )
...
* refactor(Chunk): upgrade to ES6
* test(Chunk): adding unit test for Chunk class
2017-01-04 10:17:49 -06:00
Tobias Koppers
f4ab7fc7e2
more performance improvements
2016-12-14 16:22:54 +01:00
Tobias Koppers
1296c689ac
bug fix for agressive merging
2016-09-07 12:37:47 +02:00
Tobias Koppers
1675a5a5ca
new way to handle new ids, reuse old ids
...
adjusted HMR to handle id reusing
2016-07-18 00:41:26 +02:00
Tobias Koppers
79eb404257
fixes webpack/extract-text-webpack-plugin#82
...
fixes webpack/extract-text-webpack-plugin#115
fixes webpack/extract-text-webpack-plugin#170
2016-07-15 21:59:24 +02:00
Tobias Koppers
2f618e733a
refactoring and aggressive-splitting plugin
2016-07-13 11:03:14 +02:00
Tobias Koppers
1b459d91f5
move externals into chunk with entry
...
fixes #2314
maybe fixes #2066
fixes #2375
fixes #1673
2016-05-05 10:13:50 +02:00
Tobias Koppers
996b6c80ae
cache parent checks, check faster array for contain
2016-04-10 23:55:37 +02:00
Tobias Koppers
5bbfbae551
Merge branch 'master' into webpack-2
...
Conflicts:
package.json
test/statsCases/chunks/expected.txt
2015-07-25 13:49:14 +02:00
Tobias Koppers
ea7fd67ec1
fixed #1239
2015-07-22 22:34:25 +02:00
Tobias Koppers
431a4c791c
Merge branch 'master' into webpack-2
...
Conflicts:
hot/dev-server.js
hot/only-dev-server.js
hot/poll.js
hot/signal.js
lib/ChunkTemplate.js
lib/HotModuleReplacement.runtime.js
lib/HotModuleReplacementPlugin.js
lib/JsonpMainTemplatePlugin.js
lib/MainTemplate.js
lib/NormalModule.js
lib/Parser.js
lib/RecordIdsPlugin.js
lib/WebpackOptionsApply.js
lib/dependencies/RequireEnsureDependency.js
lib/node/OldNodeWatchFileSystem.js
lib/optimize/OccurrenceOrderPlugin.js
package.json
2015-07-17 09:30:37 +02:00
Tobias Koppers
5cd6e7d0b3
fixed a few linting issues
2015-07-16 00:39:56 +02:00
Tobias Koppers
f7d799adb4
rebeautify without spacing after keyword
2015-07-16 00:19:23 +02:00
Avi Haiat
0a340f2b1a
feat(app): Beautify all lib files
2015-07-13 01:20:09 +03:00
Tobias Koppers
8cfeb51c30
refactoring and bug fixes
2015-07-07 00:11:13 +02:00
Kenny Tran
7e0a98bb29
Refactor size method for Chunks
2015-05-31 20:02:07 -07:00
Kenny Tran
9352bb8806
Fix typo in Chunk.js
2015-05-20 14:57:10 -07:00
Tobias Koppers
cebd3b9722
added linting
2015-04-23 23:55:50 +02:00
Tobias Koppers
18fe8e7b66
always create files array on Chunk
2015-01-30 00:44:58 +01:00
Tobias Koppers
544c368ea1
added support for an async commons chunk, tests and examples
2015-01-11 23:15:11 +01:00
Tobias Koppers
de1ea9d15e
allow multiple chunks for a dependency block #640
2015-01-01 21:58:27 +01:00
Tobias Koppers
e12bc992af
include [chunkhash] tests again
...
added support for [chunkhash] with target node
2014-11-02 12:48:15 +01:00
Tobias Koppers
dd232012ca
Merge pull request #427 from diurnalist/feature/templated-path-plugin-sq
...
Add TemplatedPathPlugin to generically handle asset paths w/ template vars
2014-09-11 19:09:17 +02:00
Jason Anderson
f371945a29
Add TemplatedPathPlugin
2014-09-11 15:31:08 +02:00
Tobias Koppers
e0f975eb9e
fixes webpack/extract-text-webpack-plugin#14
2014-09-07 22:54:38 +02:00
Tobias Koppers
d80cdcefac
Code Quality
2014-06-24 18:53:32 +02:00
Tobias Koppers
80f3c48d99
better code style
2014-06-03 21:03:21 +02:00
Tobias Koppers
d3a9712193
bug fixing
2014-02-03 18:12:19 +01:00
Tobias Koppers
89fb178917
add origin for used named chunks
2014-01-24 13:32:58 +01:00
Tobias Koppers
30f954067c
track chunk origin
2014-01-23 15:31:40 +01:00
Tobias Koppers
1fa9169cf2
use initial flag for initial loaded chunks
2013-12-03 23:11:14 +01:00
Tobias Koppers
153be562db
keep commons chunk in mind when optimizing
2013-12-03 11:28:00 +01:00
Tobias Koppers
a84a0433c9
better optimizing
2013-06-17 18:55:11 +02:00
Tobias Koppers
5cdb8cbf81
cache chunks, cache assets
2013-05-08 13:28:54 +02:00
Tobias Koppers
cdbc509bb4
fixed chunk parent bug
2013-02-19 11:11:54 +01:00