Commit Graph

124 Commits

Author SHA1 Message Date
Tobias Koppers 6d5310fbd6 allow multiple entryModules per chunk
allow to specify ChunkGroup to depend on
move entry modules into ChunkGraph
2018-08-15 11:51:16 +02:00
Tobias Koppers 11e127d162 pass moduleGraph along with multiple methods 2018-08-02 17:54:42 +02:00
Tobias Koppers cf5f1d723c format existing code 2018-07-30 21:29:21 +02:00
Tobias Koppers 559cf94edb Simplify imports 2018-07-09 15:09:00 +02:00
Tim Hambourger 1ef124143a Implement all path variables for webworker dynamic imports 2018-06-22 00:16:14 -05:00
Florent Cailhol 2a9452e51b Add brackets for multiline if/for statements 2018-05-29 15:45:44 +02:00
Petter Häggholm 0f5ba64235 `yarn pretty` 2018-04-06 10:34:21 -07:00
Petter Häggholm 0aa9aa61b1 #6971: Escape chunk names for webworkers 2018-04-05 18:58:39 -07:00
Tobias Koppers b018bc7ac5 more tests and fixes for webworker 2018-03-26 14:34:54 +02:00
Tobias Koppers 296542ed79 add [contenthash] support 2018-03-24 12:08:36 +01:00
Florent Cailhol 3983803d30 Destructure 'require' to improve readability 2018-03-22 12:05:58 +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
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 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
Florent Cailhol 7dd41b55c6 Replace deprecated Tapable#apply by Plugin#apply 2017-12-20 11:53:56 +01:00
Florent Cailhol f737b26260 Remove some plugin calls 2017-12-14 14:42:49 +01:00
Tobias Koppers 86786811e4
Merge pull request #6085 from webpack/refactor/static-template
make all methods on Template static
2017-12-08 17:59:15 +01:00
Florent Cailhol 36c690d37f Use tapable instead of 'plugin' 2017-12-08 14:23:31 +01:00
Tobias Koppers 16ee68b5f9 make all methods on Template static 2017-12-07 09:49:50 +01:00
Tobias Koppers 56328a7cab upgrate tapable in Templates 2017-11-28 18:43:01 +01:00
Tobias Koppers 6bb24367b2 Merge branch 'master' into next
# Conflicts:
#	lib/JsonpMainTemplatePlugin.js
#	test/WebWorkerMainTemplatePlugin.unittest.js
#	yarn.lock
2017-11-27 08:59:30 +01:00
Tobias Koppers a6f0ca9c07 fix incorrect update of the WebWorker Template 2017-11-21 12:56:55 +01:00
Tobias Koppers f7c2f8e470 Update code style to arrow functions 2017-11-08 11:56:01 +01:00
Antoine Caron 00daab2507 fixup! [fix] error on HMR with es6 bundles 2017-10-30 08:43:56 +01:00
Antoine Caron 27e4d14a31 [fix] error on HMR with es6 bundles
Fix 5776
2017-10-20 16:20:02 +02:00
Tobias Koppers c7b80cf779 bugfix 2017-09-22 14:24:12 +02:00
Tobias Koppers 6bd937d768 make things consitent 2017-09-22 14:07:28 +02:00
Tobias Koppers f6a0d51e6b Merge branch 'master' into use-set-in-chunks 2017-07-18 09:32:53 +02:00
Stoppa, Emanuele 2ccc1fdc9b Changed statement 'var' to 'const' 2017-07-04 14:13:57 +01:00
Tim Sebastian 7972859640 refactor chunk.chunks usage to check for chunk existance 2017-06-24 11:39:46 +10:00
Anatoliy Yastreb ce24a7be67 Refactor: string concatenation to template literals 2017-06-20 14:40:27 +09:00
Tobias Koppers 0257f6c6e4 Merge pull request #4907 from paraboom/feature/add_request_timeout_configurable
Make HMR request timeout configurable
2017-05-28 12:40:09 +02:00
Tobias Koppers 09d95333c5 Use Promise only when chunk load is triggered
don't use it in initialisation
fixes #4916
2017-05-24 14:58:23 +02:00
Ivan Shornikov b113a22599 Make HMR request timeout configurable 2017-05-22 02:59:45 +03:00
Tobias Koppers 22e7d254ee Add webpackMode optios for import()
Allow lazy, lazy-once and eager mode for import()
Fix a bug which caused context chunks to be merged when using chunk name
Allow to work in env where there is no Promise.resolve
2017-05-05 09:03:24 +02:00
SendilKumar N 75d15a9f04 refactor(ES6): WebWorkerTemplatePlugin to use const rather than var 2017-02-21 17:38:24 +08:00
SendilKumar N 30d4981209 refactor(es6): WebWorkerMainTemplatePlugin to use const rather than var 2017-02-21 17:37:25 +08:00
Tobias Koppers 4369dfa27c Merge pull request #4320 from sendilkumarn/refactor-ww
refactor(es6) Webworker module
2017-02-21 09:40:22 +01:00
SendilKumar N f2367c29d5 refactor(es6) Webworker module 2017-02-21 07:05:34 +08:00
SendilKumar N db2ff057f1 changing as per comments 2017-02-21 06:14:02 +08:00
SendilKumar N 21d9b62f33 refactor(ES6): WebWorkerChunkPluginTemplate migration
linting
2017-02-20 21:30:42 +08:00
Shubheksha Jalan 7dc617b00e refactor(ES6): upgrade WebWorkerHotUpdateChunkTemplatePlugin to ES6 2017-01-12 02:29:47 +05:30
Tobias Koppers 8e69a80847 code linting 2017-01-11 12:29:01 +01:00
Sean Larkin aa8d01bf8d refactor(eslint): Added no-unsed-vars, env specific .eslintrc's for buildin & hot (#3636)
* refactor(eslint): Added no-unsed-vars, env specific .eslintrc's for buildin & hot

* This change allows for buildin to now be part of the lint test by addition of an extra .eslintrc file which extends existing but sets es6 to false
* Turned on no-unused-vars for eslint, and then removed all warnings from turning that feature on
* Was getting notified of errors in "quote" property in eslintrc, so changed to correct value from error to 2.

* beautify

* swap invalid eslint config val
2016-12-30 09:43:49 -06:00
Tobias Koppers 54aa3cd0d6 Merge pull request #2988 from matthewtoast/master
fix: Convert webworker template runtime to be Promise-based API
2016-09-15 00:27:52 +02:00
Tobias Koppers afd11259b2 stricter linting and bug fixes 2016-09-15 00:22:10 +02:00
Matthew Trost 2e8f08f6ac Convert webworker template runtime to Promise-based API
Fixes 'cannot call method then on undefined' error when using HMR with a config
whose target is "webworker".

Probably should have happened with 2245c4acca
2016-09-12 18:40:23 -04: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 c838656e7f moved defaults for options.output into central place 2016-01-06 23:02:25 +01:00
Tobias Koppers ded70aef28 moves stuff from webpack-core to webpack-sources 2015-12-29 17:44:55 +01:00
Rory Hunter ebe2f371c1 Fix hot loader compatibility with Java8 Nashorn
The way that the hot loader is included in a bundle breaks in Java 8's
Nashorn engine, because of a missing semicolon. This change introduces
a placeholder value that can be correctly substituted when building
a bundle, but is otherwise inert.

Note that I don't particularly like this change, so if there's a better
fix, I'd like to hear about it.
2015-12-04 15:02:11 +00:00
Spencer Elliott c6ccf9d3a0 Add web worker HMR support 2015-11-02 22:39:24 -05: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 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
Avi Haiat daff7440a6 feat(app): Fix some obvious lint errors and warnings 2015-07-08 15:52:41 +03:00
Tobias Koppers aa21d14b37 fixed WebWorker template 2015-06-13 16:23:17 +02:00
Tobias Koppers cebd3b9722 added linting 2015-04-23 23:55:50 +02:00
Tobias Koppers d5dc904a15 fixed incomplete hash bug 2014-11-03 08:02:02 +01:00
Jason Anderson c84bd70b76 Fixes issue with hash length and loading external chunks
If the length option on a hash was being used for a file path template
(e.g. '[hash:8].js'), the file would be outputted with the correct name,
but the reference inside require.ensure would not work, because the length
truncation would operate on more than just the hash, and would truncate
some of the characters added to pad the hash value.

Fix is to implement the `hashWithLength` function where this is a problem.
This doesn't feel like a proper solution, as it adds some redundancies
in a few places, but it's only in the chunk loading blocks that this matters,
so it's small in scope.
2014-10-28 11:51:18 +01:00
Jason Anderson f371945a29 Add TemplatedPathPlugin 2014-09-11 15:31:08 +02:00
Kurt Harriger bdae82a290 Replace ad-hoc identifier cleansing with helper function
Generalized identifier cleansing to replace invalid (and unicode)
characters with underscores to ensure a valid function name.

Applied function in other places functions were generated based on
libarary name.
2014-08-04 08:25:33 -06:00
Tobias Koppers 03c87c11a4 support [name] in chunkFilename
fixes #358
2014-07-17 01:52:41 +02:00
Tobias Koppers a0394a061b refactored ChunkTemplate with plugin interface 2014-06-02 23:40:50 +02:00
Tobias Koppers 3247725ba3 refactored MainTemplate to plugin interface 2014-06-02 21:23:53 +02:00
Tobias Koppers bea08dc1a2 added node-webkit target (experimental)
added option to provide no target
added defaults for node-webkit
allow browsertests to run in node-webkit
2014-04-09 09:12:04 +02:00
Tobias Koppers 8851427ea2 use chunk ids in entry chunks too
this fixes a unnecessary download in mutli-entry compilations
2013-12-11 08:41:43 +01:00
Tobias Koppers 327a990070 fixed bugs 2013-06-19 11:53:03 +02:00
Tobias Koppers c30f16f439 added experimental deduplication support #47 2013-06-12 16:16:06 +02:00
Tobias Koppers 0de7c73ad8 SourceMap support 2013-03-26 16:54:41 +01:00
Tobias Koppers 9fe83b3dc8 improved chunk loading
now a chunk is not loaded if all included modules are already loaded (by other chunks)
2013-02-24 02:05:55 +01:00
Tobias Koppers b0a7d774a0 removed error handling, it's handled while compiling 2013-02-13 17:37:21 +01:00
Tobias Koppers 3dc62749a2 moved webworker template, added node.js template #57 2013-02-13 17:00:07 +01:00