Merge pull request #27 from redsquirrel/patch-1

Improving imports
pull/1/head
chriseth 9 years ago
commit a0587215b3
  1. 5
      src/app.js

@ -708,7 +708,7 @@ var run = function() {
cb(files[fileNameFromKey(SOL_CACHE_FILE)]);
return;
}
var importRegex = /import\s[\'\"]([^\'\"]+)[\'\"];/g;
var importRegex = /^\s*import\s*[\'\"]([^\'\"]+)[\'\"];/g;
var reloop = false;
do {
reloop = false;
@ -723,6 +723,9 @@ var run = function() {
if (getFiles().indexOf(fileKey(m)) !== -1) {
files[m] = window.localStorage[fileKey(m)];
reloop = true;
} else if (m.startsWith('./') && getFiles().indexOf(fileKey(m.slice(2))) !== -1) {
files[m] = window.localStorage[fileKey(m.slice(2))];
reloop = true;
} else if (m in cachedRemoteFiles) {
files[m] = cachedRemoteFiles[m];
reloop = true;

Loading…
Cancel
Save