Commit Graph

46 Commits

Author SHA1 Message Date
Tobias Koppers 4f813e28a9 remove customizability of __webpack_require__ function name 2018-11-05 13:13:05 +01:00
Tobias Koppers 97ed999aad Merge tag 'v4.19.0' into next
4.19.0

* Separate context for renderBoostrap and hooks
* Remove ModuleTemplate from MainTemplate.bootstrap hook
2018-09-15 13:10:58 +02:00
Tobias Koppers 13b2cdd5ae hash content of bootstrap code
instead of trying to calculate it
from inputs

fixes #8027
fixes #7984
2018-09-13 23:25:26 +02:00
Florent Cailhol f75027475b Move HMR hotBoostrap hook 2018-09-07 14:14:10 +02:00
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 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
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
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 f737b26260 Remove some plugin calls 2017-12-14 14:42:49 +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
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 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
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 30d4981209 refactor(es6): WebWorkerMainTemplatePlugin to use const rather than var 2017-02-21 17:37:25 +08:00
SendilKumar N f2367c29d5 refactor(es6) Webworker module 2017-02-21 07:05:34 +08: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 c838656e7f moved defaults for options.output into central place 2016-01-06 23:02:25 +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
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 3247725ba3 refactored MainTemplate to plugin interface 2014-06-02 21:23:53 +02:00