-
Notifications
You must be signed in to change notification settings - Fork 30.1k
Closed
Labels
a: buildBuilding flutter applications with the toolBuilding flutter applications with the toolc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityplatform-webWeb applications specificallyWeb applications specificallytoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.
Description
Generated web/index.html has absolute paths to icons, manifest.json, and flutter_service_worker.js
So if the app is at myuser.github.io you're fine.
If your app is at myuser.github.io/my_repo all of the resources will fail!
The content of the generated flutter_service_worker.js is also problematic due to "rooted" /... paths
Generated flutter_service_worker.js looks like below
'use strict';
const CACHE_NAME = 'flutter-app-cache';
const RESOURCES = {
"/index.html": "96174ee0b96776b8e7d289cca7637b01",
"/main.dart.js": "ad1f6dd5d4ec0e1c24930f46d601b869",
"/icons/Icon-192.png": "ac9a721a12bbc803b44f645561ecb1e1",
"/icons/Icon-512.png": "96e752610906ba2a93c65f8abe1645f1",
"/manifest.json": "feb08c467497da9e02cee6e9ca69701d",
"/assets/LICENSE": "610d31457f417aae1367782f0dac0769",
"/assets/AssetManifest.json": "99914b932bd37a50b983c5e7c90ae93b",
"/assets/FontManifest.json": "580ff1a5d08679ded8fcf5c6848cece7",
"/assets/fonts/MaterialIcons-Regular.ttf": "56d3ffdef7a25659eab6a68a3fbfaf16"
};
self.addEventListener('activate', function (event) {
event.waitUntil(
caches.keys().then(function (cacheName) {
return caches.delete(cacheName);
}).then(function (_) {
return caches.open(CACHE_NAME);
}).then(function (cache) {
return cache.addAll(Object.keys(RESOURCES));
})
);
});
self.addEventListener('fetch', function (event) {
event.respondWith(
caches.match(event.request)
.then(function (response) {
if (response) {
return response;
}
return fetch(event.request);
})
);
});Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
a: buildBuilding flutter applications with the toolBuilding flutter applications with the toolc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityplatform-webWeb applications specificallyWeb applications specificallytoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.