Index: lib/src/codegen/html_codegen.dart |
diff --git a/lib/src/codegen/html_codegen.dart b/lib/src/codegen/html_codegen.dart |
index 4db7c52c6c2658ca5d5734637662ee3084d3f699..cd594d43afb69964971539cc7d12974753707dd4 100644 |
--- a/lib/src/codegen/html_codegen.dart |
+++ b/lib/src/codegen/html_codegen.dart |
@@ -68,10 +68,16 @@ String generateEntryHtml(HtmlSourceNode root, AbstractCompiler compiler) { |
} |
}); |
+ var rootDir = path.dirname(root.uri.path); |
+ String rootRelative(String fullPath) { |
+ return path.relative(path.join(compiler.inputBaseDir, fullPath), |
+ from: rootDir); |
+ } |
+ |
var fragment = new DocumentFragment(); |
for (var resource in resources) { |
- var resourcePath = |
- resourceOutputPath(resource.uri, root.uri, options.runtimeDir); |
+ var resourcePath = rootRelative( |
+ resourceOutputPath(resource.uri, root.uri, options.runtimeDir)); |
var ext = path.extension(resourcePath); |
if (resource.cachingHash != null) { |
resourcePath = _addHash(resourcePath, resource.cachingHash); |
@@ -92,7 +98,7 @@ String generateEntryHtml(HtmlSourceNode root, AbstractCompiler compiler) { |
var info = lib.info; |
if (info == null) continue; |
var uri = info.library.source.uri; |
- var jsPath = compiler.getModulePath(uri); |
+ var jsPath = rootRelative(compiler.getModulePath(uri)); |
if (uri == scriptUri) mainLibraryName = compiler.getModuleName(uri); |
if (lib.cachingHash != null) { |
jsPath = _addHash(jsPath, lib.cachingHash); |