Fix Path Separator in Service Workers (#50154)

This commit is contained in:
Mehmet Oguz Derin
2020-02-05 07:18:01 +03:00
committed by GitHub
parent 4485a65e60
commit a4093edbcf
2 changed files with 4 additions and 4 deletions

View File

@@ -314,7 +314,7 @@ class WebServiceWorker extends Target {
for (File file in contents)
// Do not force caching of source maps.
if (!file.path.endsWith('main.dart.js.map'))
'/${globals.fs.path.relative(file.path, from: environment.outputDir.path)}':
'/${globals.fs.path.toUri(globals.fs.path.relative(file.path, from: environment.outputDir.path)).toString()}':
md5.convert(await file.readAsBytes()).toString(),
};
final File serviceWorkerFile = environment.outputDir