Issue 1:
I am currently working on splitting up various parts of my app into separate files and lay-loading them when needed. The concept works out, however, webpack doesn't play nicely. In two separate files - main.oj and editor.oj- I use require("highlight.js") to require the HighlightJS module. However, what the difference is:

main.oj uses the async require.

editor.oj uses the sync require directly in a call.

In main.oj:

// ...
if($("body").find("pre code").length > 0) {
require([
// Should only load the hljs stuff we need...
"highlight.js",
// Stylesheet.
"highlight.js/styles/hybrid.css"
], function(hljs){
// ... snip ...
});
}
// ...

In editor.oj:

// ...
$html = $(data);
$html.filter("pre").find("code").each(function(i, block) {
$(block).parent().css({"border":"none", "background":"none"});
require("highlight.js").highlightBlock(block);
});
// ...

... And this shows up on the compile:

chunk {2} ba91d8a1dcc9a057b0f7-2.2.js 74.6 kB {0} [rendered]
[48] ./~/highlight.js/lib/languages/ini.js 599 bytes {2} {3} [built]
[47] ./~/highlight.js/lib/languages/http.js 843 bytes {2} {3} [built]
[50] ./~/highlight.js/lib/languages/json.js 1.02 kB {2} {3} [built]
[40] ./web-lib/highlight.js 1.14 kB {2} {3} [built]
[56] ./~/highlight.js/styles/hybrid.css 1.36 kB {2} [built]
[46] ./~/highlight.js/lib/languages/markdown.js 2.3 kB {2} {3} [built]
[42] ./~/highlight.js/lib/languages/bash.js 2.35 kB {2} {3} [built]
[51] ./~/highlight.js/lib/languages/objectivec.js 2.4 kB {2} {3} [built]
[55] ./~/highlight.js/lib/languages/xml.js 2.48 kB {2} {3} [built]
[45] ./~/highlight.js/lib/languages/css.js 2.58 kB {2} {3} [built]
[52] ./~/highlight.js/lib/languages/php.js 3.28 kB {2} {3} [built]
[49] ./~/highlight.js/lib/languages/javascript.js 3.51 kB {2} {3} [built]
[44] ./~/highlight.js/lib/languages/cs.js 3.59 kB {2} {3} [built]
[43] ./~/highlight.js/lib/languages/cpp.js 4.19 kB {2} {3} [built]
[57] ./~/css-loader?keepSpecialComments=0&processImport=true&rebase=true&relativeTo=/Users/Ingwie/Work/Bird3&shorthandCompacting=true&target=/Users/Ingwie/Work/Bird3/cdn/app&sourceMap!./~/highlight.js/styles/hybrid.css 5.68 kB {2} [built]
[54] ./~/highlight.js/lib/languages/sql.js 7.25 kB {2} {3} [built]
[53] ./~/highlight.js/lib/languages/scss.js 7.6 kB {2} {3} [built]
[41] ./~/highlight.js/lib/highlight.js 22.4 kB {2} {3} [built]

chunk {3} ba91d8a1dcc9a057b0f7-3.3.js 126 kB {0} [rendered]
[60] ./web_modules/LDT.webpack.js 421 bytes {3} [built]
[48] ./~/highlight.js/lib/languages/ini.js 599 bytes {2} {3} [built]
[64] ./~/exports-loader?SelectHelper!./web_modules/LDT/lib/SelectHelper.js 698 bytes {3} [built]
[70] ./protected/extensions/BIRD3/js/views/editor/link.ejs 841 bytes {3} [built]
[47] ./~/highlight.js/lib/languages/http.js 843 bytes {2} {3} [built]
[71] ./protected/extensions/BIRD3/js/views/editor/image.ejs 851 bytes {3} [built]
[63] ./~/exports-loader?Parser!./web_modules/LDT/lib/Parser.js 862 bytes {3} [built]
[69] ./protected/extensions/BIRD3/js/views/editor/code_block.ejs 975 bytes {3} [built]
[50] ./~/highlight.js/lib/languages/json.js 1.02 kB {2} {3} [built]
[40] ./web-lib/highlight.js 1.14 kB {2} {3} [built]
[68] ./protected/extensions/BIRD3/js/views/editor/bg_color.ejs 1.19 kB {3} [built]
[65] ./web_modules/LDT/lib/TextareaDecorator.css 1.46 kB {3} [built]
[62] ./~/exports-loader?Keybinder!./web_modules/LDT/lib/Keybinder.js 2.14 kB {3} [built]
[46] ./~/highlight.js/lib/languages/markdown.js 2.3 kB {2} {3} [built]
[42] ./~/highlight.js/lib/languages/bash.js 2.35 kB {2} {3} [built]
[51] ./~/highlight.js/lib/languages/objectivec.js 2.4 kB {2} {3} [built]
[55] ./~/highlight.js/lib/languages/xml.js 2.48 kB {2} {3} [built]
[45] ./~/highlight.js/lib/languages/css.js 2.58 kB {2} {3} [built]
[66] ./~/css-loader?keepSpecialComments=0&processImport=true&rebase=true&relativeTo=/Users/Ingwie/Work/Bird3&shorthandCompacting=true&target=/Users/Ingwie/Work/Bird3/cdn/app&sourceMap!./web_modules/LDT/lib/TextareaDecorator.css 2.7 kB {3} [built]
[52] ./~/highlight.js/lib/languages/php.js 3.28 kB {2} {3} [built]
[49] ./~/highlight.js/lib/languages/javascript.js 3.51 kB {2} {3} [built]
[44] ./~/highlight.js/lib/languages/cs.js 3.59 kB {2} {3} [built]
[61] ./~/exports-loader?TextareaDecorator!./web_modules/LDT/lib/TextareaDecorator.js 3.71 kB {3} [built]
[43] ./~/highlight.js/lib/languages/cpp.js 4.19 kB {2} {3} [built]
[67] ./protected/extensions/BIRD3/js/views/editor/toolbar.ejs 6.15 kB {3} [built]
[54] ./~/highlight.js/lib/languages/sql.js 7.25 kB {2} {3} [built]
[53] ./~/highlight.js/lib/languages/scss.js 7.6 kB {2} {3} [built]
[58] ./protected/extensions/BIRD3/js/editor.oj 12.3 kB {3} [built]
[41] ./~/highlight.js/lib/highlight.js 22.4 kB {2} {3} [built]
[59] ./web_modules/behave.js/behave.js 24.4 kB {3} [built]

My config is pretty big. So, I uploaded it as a gist.

How can I avoid the duplicated inclusion? Is there a plugin I have to activate?

Kind regards, Ingwie.

Issue 2:
There are files which are 80% or under for test coverage on Coveralls, giving them a red label. Providing these files with dedicated unit tests will help solidify their API, as well as bring their coverage up to 100%.

Please see the coverall coverage report: https://coveralls.io/github/webpack/webpack

This issue aims to help co-ordinate any effort to add unit test for these files, with the aim then have all files with higher than 80% coverage when closed off.

(65.73%) lib/MultiCompiler.js - #3802 - Merged

(70.45%) lib/LibraryTemplatePlugin.js - #3835 - Merged

(74.19%) lib/optimize/UglifyJsPlugin.js - #4127 - Merged

(75.00%) lib/webworker/WebWorkerMainTemplatePlugin.js - #3866 - Merged

(75.00%) examples/move-to-parent/webpack.config.js - #4092 - Merged

(75.93%) lib/node/NodeMainTemplatePlugin.js - #3999 - Merged

(79.49%) lib/node/NodeWatchFileSystem.js - #3837 - Merged

(80.00%) lib/HotUpdateChunkTemplate.js - #3867 - Merged

(75.68%) lib/ContextReplacementPlugin.js

(78.57%) lib/dependencies/ContextDependencyTemplateAsId.js - #4203

(80.00%) lib/EnvironmentPlugin.js - #4201 - Merged

Add a comment below if you're adding unit tests for one of the files above to prevent duplication of effort, and then link to the PR once it's up.