Skip to content

Commit 65d73d6

Browse files
committed
use dependency graph for resolving overall order instead of traces
traces in current implementation can't be correct, because trace doesn't count dependencies in case if dependency already loaded
1 parent bdee7db commit 65d73d6

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

file-system-loader.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ var FileSystemLoader = (function () {
4848

4949
this.root = root;
5050
this.sources = {};
51-
this.traces = {};
5251
this.importNr = 0;
5352
this.core = new _indexJs2['default'](plugins);
5453
this.tokensByFile = {};
@@ -107,7 +106,6 @@ var FileSystemLoader = (function () {
107106
var exportTokens = _ref.exportTokens;
108107

109108
_this.sources[fileRelativePath] = injectableSource;
110-
_this.traces[trace] = fileRelativePath;
111109
_this.tokensByFile[fileRelativePath] = exportTokens;
112110
resolve(exportTokens);
113111
}, reject);
@@ -117,12 +115,10 @@ var FileSystemLoader = (function () {
117115
}, {
118116
key: 'finalSource',
119117
get: function () {
120-
var traces = this.traces;
121118
var sources = this.sources;
122119
var written = {};
123120

124-
return Object.keys(traces).sort(traceKeySorter).map(function (key) {
125-
var filename = traces[key];
121+
return this.deps.overallOrder().map(function (filename) {
126122
if (written[filename] === true) {
127123
return null;
128124
}

0 commit comments

Comments
 (0)