Commit Graph

58 Commits

Author SHA1 Message Date
Neehar Venugopal 21b5a026ba stringify jsonpScriptType option 2018-01-04 20:06:24 +05:30
Neehar Venugopal 8eb0bb675e move default script type option to WebpackOptionsDefaulter 2018-01-04 20:00:50 +05:30
Neehar Venugopal be327f9718 lint fixes 2018-01-03 15:39:05 +05:30
Neehar Venugopal 06c19e9565 add support for new output option jsonpScriptType 2017-12-31 17:13:59 +05:30
Antoine Caron 27e4d14a31 [fix] error on HMR with es6 bundles
Fix 5776
2017-10-20 16:20:02 +02:00
Samuel Reed 6aa3154753
Also add script.crossOrigin for hot-reloaded chunks
Related: #988

Useful especially for hot-reloaded React 16 apps so that the global
onerror handler can render error boundaries properly.
2017-09-27 14:16:34 -05: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
restrry f2264e4202 make chunkLoadTimeout option cofigurable 2017-05-11 10:41:38 +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
Tobias Koppers 5210230d4b Merge branch 'master' into master 2017-04-09 09:45:56 +02:00
Tobias Koppers 72f71762a0 remove nested template string
linter seem to have a problem with it
2017-04-04 10:18:43 +02:00
SendilKumar N dbf4b0d7eb changed to template strings 2017-04-04 10:18:43 +02:00
Tobias Koppers afb400d3dc formating 2017-04-04 10:18:43 +02:00
SendilKumar N f962eee840 fixing comments 2017-04-04 10:18:43 +02:00
SendilKumar N 854373912b Refactor(ES6): JsonpMainTemplatePlugin 2017-04-04 10:18:43 +02:00
Stefan Schneider 4d82a9d193 Added more missing {} around if and while in templates 2017-03-31 15:16:55 +02:00
Tim Sebastian b8e1981e09 allow chunk.id to be a number - or rather a non-null-something 2017-03-26 20:30:52 +11:00
Tobias Koppers 23e1f7c8c9 install Promise early in chunk cache
IE executes script very early when cached

fixes #4472
2017-03-21 16:08:45 +01:00
David Mitchell f15640f551 Fix typo in comment. 2017-02-09 14:00:53 -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
Roman Vyakhirev b55844f2c7 Fixes chunk loading in IE.
Append jsonp-caller script to the head only if everything is ready to process chunk.
Needed because IE can execute script synchronously regardless `async` flag if script cached.
2016-12-22 12:01:05 +01:00
Luna Frank-Fischer 5a4e39fe71 added nonce capability
change expected outputs of stats cases so they match new output

added nonce test to browser tests
2016-11-23 12:53:56 -08: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 7109be58b3 detect main module more reliable
#2648
2016-06-16 01:05:17 +02:00
Tobias Koppers bd2f5f62f0 fixed bug with DedupePlugin 2016-06-05 20:41:21 +02:00
Tobias Koppers 7747251d9e fixes #2603 2016-06-05 20:35:42 +02:00
Tobias Koppers 4b4592e4c2 bug fix jsonp template plugin 2016-06-04 18:51:18 +02:00
Tobias Koppers af2a362ba1 move require.onError default to jsonp template 2016-06-04 17:29:43 +02:00
Tobias Koppers fd5b8960b7 executeModules is an array, test hasOwnProperty
#2232
fixes #2546
2016-06-04 11:45:07 +02:00
Tobias Koppers 6ac871344e moved error handler back to MainTemplate 2016-02-04 13:14:26 +01:00
Tobias Koppers 1c1a5cac3f smaller bundles without Code Splittings 2016-02-04 12:51:40 +01:00
Tobias Koppers 2e5a5f9db3 more pretty CLI options, added --verbose option 2016-01-14 21:21:09 +01:00
Julian Scheid d4db20aacc Add a hook for adding script attributes
Closes #1800
2016-01-08 17:45:53 +01: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
Tobias Koppers bf1f1142d0 Chunk loading error handling
fixes #692
fixes #758
fixes #686
fixes #785
2015-10-24 12:20:51 +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 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 2245c4acca Promise based chunk loading API
don't flag entry module with `0` id anymore
use extra argument in chunk instead
this allows to require entry points
2015-06-13 11:45:28 +02:00
Tobias Koppers 6c1eb49539 separated runtime code from compiler code
for better coverage data
2015-04-28 23:38:41 +02:00
Tobias Koppers cebd3b9722 added linting 2015-04-23 23:55:50 +02:00
Daniel Tschinder d7458e23ca Added possibility to crossorigin load chunks
Done by adding the crossorigin attribute to the injected script tag
2015-04-17 15:57:42 +02:00
Tobias Koppers 76f1c2fa0e Improve HMR error handling #410 2014-12-31 01:47:52 +01:00
Tobias Koppers 738c1d3e68 support library with CommonsChunkPlugin
fixes #622
2014-12-22 16:10:23 +01:00
Tobias Koppers d5dc904a15 fixed incomplete hash bug 2014-11-03 08:02:02 +01:00
Tobias Koppers e12bc992af include [chunkhash] tests again
added support for [chunkhash] with target node
2014-11-02 12:48:15 +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 b3f0ddab32 Load extra JSONP chunks with async script tags
If requests are made while other chunks are loading, it can cause blocking
requests to load the additional chunks. Code splitting should ensure that
you can load these chunks completely async, and so we should.
2014-10-14 14:30:05 +02:00
Tobias Koppers 3bc6d7b60b fixed edge case when using [chunkhash:xxx]
#427
2014-09-11 19:25:18 +02:00