From 634ca27360c0f6ef4c037d43ea896c4ce1b776b6 Mon Sep 17 00:00:00 2001 From: godspeedelbow Date: Mon, 16 Mar 2015 21:25:09 +0100 Subject: [PATCH] Fixed module exclusion - modules that were supposed to be excluded, were included anyway, because the exclude part of the url was not parsed properly. - it's not clear to me what the `options` object and `options.exm` do specifically, as they are not used anywhere else in the project. I took a bold guess, figured it was an anomaly and removed it. --- demo-server.js | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/demo-server.js b/demo-server.js index d186ef3..062033d 100644 --- a/demo-server.js +++ b/demo-server.js @@ -34,22 +34,15 @@ function run(err, moduleServer) { path = path.replace(/^\//, ''); var parts = path.split(/\//); var modules = decodeURIComponent(parts.shift()).split(/,/); - var options = {}; - parts.forEach(function(part) { - var pair = part.split(/=/); - options[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1]); - }); var exclude = null; - if(options.exm) { - exclude = options.exm.split(/,/); + if (parts.length) { + exclude = decodeURIComponent(parts.shift()).split(/,/); } return moduleServer(modules, exclude, onJs, { createSourceMap: isSourceMapRequest, sourceMapSourceRootUrlPrefix: ORIGINAL_SOURCE_PATH_PREFIX, debug: true, - onLog: function() { - console.log(arguments); - } + onLog: console.log }); }