Commit 15039380 authored by yann300's avatar yann300

fix import

parent fa34ec91
...@@ -236,8 +236,13 @@ function Compiler (handleImportCall) { ...@@ -236,8 +236,13 @@ function Compiler (handleImportCall) {
while ((match = importRegex.exec(files[fileName]))) { while ((match = importRegex.exec(files[fileName]))) {
var importFilePath = match[1] var importFilePath = match[1]
if (importFilePath.startsWith('./')) { if (importFilePath.startsWith('./')) {
var path = /(.*\/).*/.exec(target)
if (path !== null) {
importFilePath = importFilePath.replace('./', path[1])
} else {
importFilePath = importFilePath.slice(2) importFilePath = importFilePath.slice(2)
} }
}
// FIXME: should be using includes or sets, but there's also browser compatibility.. // FIXME: should be using includes or sets, but there's also browser compatibility..
if (importHints.indexOf(importFilePath) === -1) { if (importHints.indexOf(importFilePath) === -1) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment