Commit Graph

4008 Commits

Author SHA1 Message Date
Tobias Koppers 6dbae4bdce
Merge pull request #9349 from gfx/json_module_as_json
[performance] use JSON.parse(jsonSource) for JSON modules
2019-07-02 13:40:44 +02:00
Tobias Koppers 1cc9f8799b deduplicate code 2019-07-02 11:17:52 +02:00
Tobias Koppers fec4d536a3 only affect loader order when match resource is used 2019-07-01 09:37:35 +02:00
FUJI Goro (gfx) 9f43b8b026 use JSON.parse(jsonSource) for JSON modules
https://v8.dev/blog/cost-of-javascript-2019
> As long as the JSON string is only evaluated once, the JSON.parse approach is much faster compared to the JavaScript object literal, especially for cold loads.
2019-06-28 10:50:23 +09:00
James Chapman 49dc747a63 fix loader ordering 2019-06-25 19:26:53 +01:00
jamesgeorge007 0109d687a6 Linting fix 2019-06-19 20:29:37 +05:30
James George 3321f3138e
Handle cryptic error message being thrown
misconfigured config file
2019-06-19 20:05:43 +05:30
Tobias Koppers 8522a2d86d
Merge pull request #9285 from ryandrew14/master
feat: introduce name truncation config option for SplitChunksPlugin
2019-06-18 22:20:39 +02:00
Ryan Drew 07dc8330d0 update name-too-long comment to length 109 2019-06-18 10:29:09 -04:00
Ryan Drew 6e16e12007 remove update to 100 line length
This commit removes the update to 100 line length. It's bad
practice to introduce a behavior change like that.
2019-06-18 10:04:14 -04:00
ikopeykin 7cdff6c172 refactor(esdoc): OptionsDefaulter 2019-06-17 11:55:54 +03:00
Ryan Drew 054c933950 introduce name truncation config option for SplitChunksPlugin 2019-06-15 14:20:48 -04:00
Tobias Koppers bba93d2a85
Merge pull request #9214 from jkzing/feat/suspend-watching
feat(watching): allow suspend/resume compilation
2019-06-13 17:57:10 +02:00
Tobias Koppers 681abf0830
Merge pull request #9225 from Bkucera/issue-9221
fix progress on line wrap (trim line to stderr.columns)
2019-06-13 17:49:22 +02:00
jkzing 460b099a63 test(watching): add integration test 2019-06-13 19:26:31 +08:00
jkzing df27a5e2bd feat(watching): allow suspend compilation 2019-06-13 19:18:00 +08:00
scarletsky cd0ea22d8f fix: quotes 2019-06-13 15:42:01 +08:00
scarletsky ad08ecc345 fix: use __webpack_require__.p instead 2019-06-13 15:26:15 +08:00
scarletsky 0ddada8ce6 fix: add missing public path in importScripts 2019-06-13 14:49:24 +08:00
Tobias Koppers 06521142a3
Merge pull request #9268 from webpack/bugfix/let-scopes
handle block scopes correctly
2019-06-13 01:09:27 +02:00
Tobias Koppers e04b1a52a0 handle block scopes correctly
fixes #9253
fixes #9183
2019-06-13 00:41:42 +02:00
Tobias Koppers 8d5ad83b32 simplify code 2019-06-12 15:16:54 +02:00
alreadyExisted df5e118da4 fix(mjs): remove unused namespace build errors 2019-06-12 14:46:39 +02:00
Felix Becker 7fb14ec2c2 Add name property to error thrown on chunk load failure
This allows to catch failed chunk loads
2019-06-12 10:30:26 +02:00
Tobias Koppers fd4b3c503a pretty files 2019-06-09 11:23:42 +02:00
Tobias Koppers 6f25c3bdbd
Merge pull request #9150 from cacheflow/show-loaders-used-when-module-parsing-fails
feat(NormalModule/ModuleParseError): Show loaders used from config when module parsing fails
2019-06-04 23:24:21 +02:00
Ben Kucera 7aefa64b0a refactor test, evenly truncate details text, properly handle undefined stderr.columns 2019-06-04 12:33:55 -04:00
Tobias Koppers aa78e27a44 fix splitting of windows newlines
move fixture
update snapshots
2019-06-04 14:48:46 +02:00
Ben Kucera e7c2b7d813 fix progress on line wrap (trim line to stderr.columns) 2019-06-03 18:27:38 -04:00
Tobias Koppers 45582c51e7 avoid loading from rule set, simplify 2019-06-03 17:00:50 +02:00
Lex Alexander 1c6e7a9344 feat(NormalModule/ModuleParseError): Show loaders used from config when module parsing fails
-Closes #9025
2019-05-29 14:11:49 -07:00
Tobias Koppers 46b428b9d9 fix rejection when removing and readding self-accepted module
fixes #9198

Co-authored-by: rixo <eric@rixo.fr>
2019-05-29 09:28:19 +02:00
OJ Kwon 2ec75c1cdb
feat(target): support electron preload async chunk loading 2019-05-25 18:02:00 -07:00
Tobias Koppers fec26a9503 fix concatenated version of reexport dependency for sideEffects
fixes #9159
2019-05-22 21:32:52 +02:00
Tobias Koppers a4406ff187 improve validation errors 2019-05-22 13:46:07 +02:00
Tobias Koppers 0963d744e9 add test case for enum validation 2019-05-22 13:45:53 +02:00
Tobias Koppers 5b08ab51c3 fixes #9156
node: false should not disable CommonJs features
2019-05-22 08:03:44 +02:00
Tobias Koppers a4bbdae0d2 fix problem with dll and sideEffects
allow to redirect module and id in reexports
SideEffects plugin redirects reexports too
fixes #9146
2019-05-20 11:28:33 +02:00
Tobias Koppers 36c7ab73ab
Merge pull request #9128 from rchl/fix/useful-chunk-load-stacktrace
fix: provide useful stacktrace on chunk loading failure
2019-05-20 09:24:02 +02:00
Rafal Chlodnicki b322070344 fix: provide useful stacktrace on chunk loading failure
Error created from load/error event handler has no useful stack trace
whatsoever as it's an async event and stack has unwound already at that
point.

To have better (sync) stacktrace of what triggered loading of the
chunk, create error before stack has unwound and use it and its
stacktrace later, in case of an error.

This potentially has some processing overhead as browser needs to
create a stacktrace. It's probably not that big though but I haven't
done any real testing.
2019-05-19 22:11:24 +02:00
Tim Schaub 1a63d7bd0d
Default to production
Co-Authored-By: Tobias Koppers <tobias.koppers@googlemail.com>
2019-05-16 13:50:31 -06:00
Tim Schaub 290ab5d071
Allow loaders to access the mode 2019-05-16 10:18:16 -06:00
Tobias Koppers d2dbdd9b30
Merge pull request #9115 from webpack/bugfix/pefetch-public-path
fix prefetching with runtime public path
2019-05-13 13:21:02 +02:00
Tobias Koppers b05377c6f7
Merge pull request #9054 from zcfan/fix-9042
Turn off NodeStuffPlugin with when "node" configuration set to "false"
2019-05-13 11:05:09 +02:00
Tobias Koppers e062e899f6
Merge pull request #9063 from ominiom/fix-parser-object-pattern-rest-element-issue
fix(parser): Rest element identifiers in object patterns not added to defined variables of scope
2019-05-11 00:09:42 +02:00
Tobias Koppers b6090b6943 delay prefetching until all initial code is evaluated
add test case
fix bug in Chunk.getChildIdsByOrdersMap
2019-05-10 23:10:32 +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
Alan Zhang 8fbcc5672f don't evaluate `__dirname` and `__filename` when set to false 2019-04-29 02:41:54 +08:00
Iain Wilson eaf8be005f Arrange differently for coverage 2019-04-25 16:09:55 +01:00
Iain Wilson 420ffc296f fix(parser): Fixes a parser issue where rest element identifiers in object patterns were not added to the defined variables of the scope 2019-04-25 14:44:07 +01:00