Commit Graph

167 Commits

Author SHA1 Message Date
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 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 ea56916d53 rename `async` to `mode` in context options
`async: false` is now `mode: "sync"`
2017-10-16 14:49:51 +02:00
Tobias Koppers 47d00a525f use util.deprecate to deprecate properties in ContextModule 2017-10-16 12:16:07 +02:00
Tobias Koppers aa8d076407 fix comment 2017-10-16 09:36:59 +02:00
Landon Crapo 0a141f21c8 fixed failing tests 2017-10-13 17:51:01 -06:00
Landon Crapo bc6c1be90c refactoring filter to include and other requested changes 2017-10-13 15:41:44 -06:00
Landon Crapo 5d1759fd4c modified import context filtering logic to filter on file names. 2017-10-13 15:41:02 -06:00
Tobias Koppers 72544de846 code cleanup 2017-07-26 15:13:39 +02:00
Tobias Koppers 94e0fcb80a rename eager-weak to weak in import() comment
rename ImportEagerWeak to ImportWeak
rename "eager-weak" asyncMode to "async-weak"

weak dependencies don't need to be in dependencies blocks
2017-07-26 14:49:37 +02:00
James Gillmore 8bca2dc95c fix/feat($weak): add context support for resolveWeak + create eager-weak asyncMode 2017-07-26 13:12:59 +02:00
James Gillmore 1102e60395 fix($lint): fix linting errors 2017-07-26 13:12:59 +02:00
James Gillmore 4636e5a705 feat($weakContext): create "weak-context" asyncMode for universal rendering 2017-07-26 13:12:59 +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
J Huang 6afc397b99 perf: use Date.now() instead of new Date().getTime()
new Date().getTime() is 2x slower than Date.now(), see https://jsperf.com/new-date-vs-date-now-vs-performance-now/6
2017-05-04 10:19:54 +08:00
mc-zone b65432a2f1 Add specify chunk name feature for `import()`
Add specify chunk name feature for `import()` by following special comment block after the param:

  import('./foo' /* webpackChunkName = "myChunkName" */)

Thus we can use chunk name like `requre.ensure` and avoid conflicts with the specification.
2017-03-26 17:18:30 +08:00
Tobias Koppers b732e1b25b rename count to size 2017-02-28 12:07:27 +01:00
Tim Sebastian 1e906f1468 apply review changes 2017-02-23 21:52:11 +11:00
Tim Sebastian c29f324f07 set dependencies to empty array if they dont exist
no need to check them in size calculation for existance anymore
2017-02-19 11:00:06 +11:00
Tim Sebastian d424633467 rename hasMultipleChunks to hasMultipleOrNoChunks 2017-02-18 23:01:29 +11:00
Tim Sebastian 833c0330fd refactor source method of contextmodule 2017-02-18 22:41:39 +11:00
Tim Sebastian f77775d0f6 refactor `size` 2017-02-18 21:13:39 +11:00
Tim Sebastian a61ec92a0a simplify build by early returning if no dependencies exist 2017-02-18 21:09:18 +11:00
Tim Sebastian 4d6fafe1b5 simplify identifiers 2017-02-18 20:29:21 +11:00
Tim Sebastian a3f0da5b89 describe prettyRegExp and give param an better name 2017-02-18 20:26:47 +11:00
Tim Sebastian 084d11231b cleanup contextify usage by passing context directly as parameter 2017-02-18 20:15:29 +11:00
Tim Sebastian 4cd13ca651 refactor ContextModule to esnext 2017-02-18 20:14:43 +11:00
Tobias Koppers 8e69a80847 code linting 2017-01-11 12:29:01 +01:00
Tobias Koppers da29d21ae4 performance improvements
breaking change: Module has now a "unbuild" method that must work correctly
2016-12-14 16:22:16 +01:00
Tobias Koppers 4414de18ba support lib ids for context modules 2016-12-14 12:03:56 +01:00
Matthew Pietz 6c6eb3ae98 Escape webpackContext.id value 2016-12-08 12:14:51 -08:00
Noah Fontes ab9aef1140 Fix issue with async dynamic System.import dependencies not being re-emitted 2016-06-28 10:42:35 -07:00
Tobias Koppers c46e3e82c0 fixed System.import context
fixed #2490
2016-06-05 09:15:17 +02:00
e-cloud 13322ca35c add missing constructors for all classes needed
As i walk through the source, i've tried to trace the webpack running stack.
Then, i find the missing constructors result in uncleasr stack and create a patch
for them.
2016-05-20 13:39:36 +08:00
Tobias Koppers 93f38132d1 fixed #2443 2016-05-14 14:41:31 +02:00
Tobias Koppers ce642eced6 reverted module.e to module.exports
because it causes issues with modules that define
exports on the module object
2016-04-21 23:50:40 +02:00
Tobias Koppers 902220a0ea smaller bundles by using module.e instead of module.exports
same for module.loaded and module.id
2016-02-13 13:11:34 +01:00
Tobias Koppers a4cc54e759 added manual context map option to ContextReplacementPlugin 2016-01-06 19:56:17 +01:00
Tobias Koppers ded70aef28 moves stuff from webpack-core to webpack-sources 2015-12-29 17:44:55 +01:00
Tobias Koppers 4c69156172 fixed #1769 2015-12-22 11:00:48 +01:00
Tobias Koppers f3197f5313 typo 2015-09-03 11:36:02 +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 d98df52a49 added System.import API and async context 2015-07-01 00:19:52 +02: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 d3a7994e35 expose `loc` for every Dependency 2015-05-10 18:31:58 +02:00
Tobias Koppers cebd3b9722 added linting 2015-04-23 23:55:50 +02:00
Tobias Koppers c0686c4430 support an empty context
fixed #524
2014-10-12 11:24:42 +02:00
Tobias Koppers 63e2dd3804 better gzip for context 2014-09-26 08:52:47 +02:00
Mark Marijnissen 8fbfbc9e34 Update ContextModule.js
added semicolon
2014-09-15 17:59:49 +02:00
Mark Marijnissen aa39f79baf Add 'id' attribute to require.context (so HMR can accept a context) 2014-09-14 01:50:59 +02:00
Tobias Koppers 61bc53e875 Shorter and faster empty context
#198
2014-07-26 14:48:42 +02:00
Tobias Koppers d80cdcefac Code Quality 2014-06-24 18:53:32 +02:00
Tobias Koppers 0fea43b4cb rename generated require to __webpack_require__
fixes #141
fixes RubenVerborgh/N3.js#18
2014-03-03 14:56:17 +01:00
Tobias Koppers 074a26efb5 Performance #106 2013-10-14 13:59:44 +02:00
Tobias Koppers 0de7c73ad8 SourceMap support 2013-03-26 16:54:41 +01:00
Tobias Koppers f3213f2d00 create context for more stuff 2013-02-20 20:40:40 +01:00
Tobias Koppers 90f8a42ab3 fixed some examples stuff 2013-02-13 11:51:08 +01:00
Tobias Koppers 453c0226aa Fix context modules 2013-02-04 12:34:20 +01:00
Tobias Koppers e8f0e1d7cf fix watching 2013-02-01 08:03:38 +01:00
Tobias Koppers 961ad40966 file watching 2013-01-31 18:00:22 +01:00
Tobias Koppers ee01837d66 Refactored everything for 0.9 2013-01-30 18:49:25 +01:00