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

Commit

Permalink
runtime plugin fix
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford committed Oct 15, 2015
1 parent 68cef2e commit d5520a1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/compile.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,10 @@ function compileTree(loader, tree, compileOpts, outputOpts, cache) {
// get entrypoints from graph algorithm
var entryPoints = ordered.entryPoints;
var modules = ordered.modules.filter(function(moduleName) {
return tree[moduleName] && !tree[moduleName].conditional;
var load = tree[moduleName];
if (load.runtimePlugin && compileOpts.static)
throw new TypeError('Plugin ' + load.runtimePlugin + ' does not support static builds, compiling ' + load.name + '.');
return load && !load.conditional && !load.runtimePlugin;
});

if (compileOpts.encodeNames)
Expand All @@ -139,9 +142,6 @@ function compileTree(loader, tree, compileOpts, outputOpts, cache) {
if (load === true)
throw new TypeError(name + ' was defined via a bundle, so can only be used for subtraction or union operations.');

if (compileOpts.static && load.runtimePlugin)
throw new TypeError('Plugin ' + load.runtimePlugin + ' does not support static builds, compiling ' + load.name + '.');

// store plugin loads for bundle hook
if (load.metadata.loader && load.metadata.loaderModule.bundle) {
var pluginLoad = extend({}, load);
Expand Down

0 comments on commit d5520a1

Please sign in to comment.