Unverified Commit 11589ca2 authored by Jacob MacDonald's avatar Jacob MacDonald Committed by GitHub

serve the generated main.dart file so source_maps work for it (#50976)

parent d0b7f0cd
......@@ -431,6 +431,7 @@ class WebDevFS implements DevFS {
if (bundleFirstUpload) {
generator.addFileSystemRoot(outputDirectoryPath);
final String entrypoint = globals.fs.path.basename(mainPath);
webAssetServer.writeFile('/$entrypoint', globals.fs.file(mainPath).readAsStringSync());
webAssetServer.writeFile('/manifest.json', '{"info":"manifest not generated in run mode."}');
webAssetServer.writeFile('/flutter_service_worker.js', '// Service worker not loaded in run mode.');
webAssetServer.writeFile(
......
......@@ -319,6 +319,7 @@ void main() {
invalidatedFiles: <Uri>[],
);
expect(webDevFS.webAssetServer.getFile('/main.dart'), isNotNull);
expect(webDevFS.webAssetServer.getFile('/manifest.json'), isNotNull);
expect(webDevFS.webAssetServer.getFile('/flutter_service_worker.js'), isNotNull);
......
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