treat exports from debugOnly packages same way that we treat weak dependencies and do not export them by default

This commit is contained in:
ekatek
2014-10-08 22:04:05 -07:00
parent 7f134bdfb4
commit 4a4e7c19ff

View File

@@ -132,14 +132,15 @@ _.extend(Unibuild.prototype, {
// packages get precedence.
//
// We don't get imports from unordered dependencies (since they may not be
// defined yet) or from weak dependencies (because the meaning of a name
// shouldn't be affected by the non-local decision of whether or not an
// unrelated package in the target depends on something).
// defined yet) or from weak/debugOnly dependencies (because the meaning of
// a name shouldn't be affected by the non-local decision of whether or not
// an unrelated package in the target depends on something).
var imports = {}; // map from symbol to supplying package name
compiler.eachUsedUnibuild(
self.uses,
bundleArch, loader,
{skipUnordered: true}, function (depUnibuild) {
{ skipUnordered: true, skipDebugOnly: true },
function (depUnibuild) {
_.each(depUnibuild.packageVariables, function (symbol) {
// Slightly hacky implementation of test-only exports.
if (symbol.export === true ||