Skip to content
This repository has been archived by the owner on Oct 9, 2020. It is now read-only.

Commit

Permalink
ensure conditional entry points are excluded from static builds
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford committed Apr 16, 2016
1 parent dd3dcdf commit 104ff4f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/compile.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,13 +213,15 @@ function compileTree(loader, tree, traceOpts, compileOpts, outputOpts, cache) {
return [];

return Promise.all(compileOpts.entryPoints.map(function(entryPoint) {

// NB do we need to check that entry points are conditionally unique?
return loader.normalize(entryPoint)
.then(function(normalized) {
return loader.getCanonicalName(normalized);
});
}));
}))
.filter(function(inputEntryPoint) {
// skip conditional entry points
return !inputEntryPoint.match(/\#\:|\#\?|\#{/);
})
})
.then(function(inputEntryPoints) {
entryPoints = inputEntryPoints || [];
Expand Down

0 comments on commit 104ff4f

Please sign in to comment.