| Index: lib/src/utils.dart
|
| diff --git a/lib/src/utils.dart b/lib/src/utils.dart
|
| index 6f92e2252729d004693d5977fbc2ef885af6e279..b1794f63cc3e2adffd0e1d35a83c8682d6ed30e8 100644
|
| --- a/lib/src/utils.dart
|
| +++ b/lib/src/utils.dart
|
| @@ -314,7 +314,12 @@ String resourceOutputPath(Uri resourceUri, Uri entryUri, String runtimeDir) {
|
|
|
| if (resourceUri.scheme != 'file') return null;
|
|
|
| - var entryDir = path.dirname(entryUri.path);
|
| + var entryPath = entryUri.path;
|
| + // The entry uri is either a directory or a dart/html file. If the latter,
|
| + // trim the file.
|
| + var entryDir = entryPath.endsWith('.dart') || entryPath.endsWith('.html')
|
| + ? path.dirname(entryPath)
|
| + : entryPath;
|
| var filepath = path.normalize(path.join(entryDir, resourceUri.path));
|
| if (path.isWithin(runtimeDir, filepath)) {
|
| filepath = path.relative(filepath, from: runtimeDir);
|
|
|