mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Fix flutter web app not respecting assets path when in non-root folder (#96774)
This commit is contained in:
parent
0d4b73b2e8
commit
201a64c98f
@ -136,7 +136,6 @@ Future<void> runWebServiceWorkerTest({
|
|||||||
});
|
});
|
||||||
|
|
||||||
expectRequestCounts(<String, int>{
|
expectRequestCounts(<String, int>{
|
||||||
'': 1,
|
|
||||||
// Even though the server is caching index.html is downloaded twice,
|
// Even though the server is caching index.html is downloaded twice,
|
||||||
// once by the initial page load, and once by the service worker.
|
// once by the initial page load, and once by the service worker.
|
||||||
// Other resources are loaded once only by the service worker.
|
// Other resources are loaded once only by the service worker.
|
||||||
@ -183,7 +182,6 @@ Future<void> runWebServiceWorkerTest({
|
|||||||
expectRequestCounts(<String, int>{
|
expectRequestCounts(<String, int>{
|
||||||
'index.html': 2,
|
'index.html': 2,
|
||||||
'flutter_service_worker.js': 2,
|
'flutter_service_worker.js': 2,
|
||||||
'': 1,
|
|
||||||
'main.dart.js': 1,
|
'main.dart.js': 1,
|
||||||
'assets/NOTICES': 1,
|
'assets/NOTICES': 1,
|
||||||
'assets/AssetManifest.json': 1,
|
'assets/AssetManifest.json': 1,
|
||||||
@ -210,7 +208,6 @@ Future<void> runWebServiceWorkerTest({
|
|||||||
});
|
});
|
||||||
|
|
||||||
expectRequestCounts(<String, int>{
|
expectRequestCounts(<String, int>{
|
||||||
'': 1,
|
|
||||||
'index.html': 2,
|
'index.html': 2,
|
||||||
// We still download some resources multiple times if the server is non-caching.
|
// We still download some resources multiple times if the server is non-caching.
|
||||||
'main.dart.js': 2,
|
'main.dart.js': 2,
|
||||||
@ -260,7 +257,6 @@ Future<void> runWebServiceWorkerTest({
|
|||||||
'flutter_service_worker.js': 1,
|
'flutter_service_worker.js': 1,
|
||||||
});
|
});
|
||||||
expectRequestCounts(<String, int>{
|
expectRequestCounts(<String, int>{
|
||||||
'': 1,
|
|
||||||
'index.html': 2,
|
'index.html': 2,
|
||||||
'flutter_service_worker.js': 2,
|
'flutter_service_worker.js': 2,
|
||||||
'main.dart.js': 2,
|
'main.dart.js': 2,
|
||||||
|
@ -518,7 +518,6 @@ class WebServiceWorker extends Target {
|
|||||||
final String serviceWorker = generateServiceWorker(
|
final String serviceWorker = generateServiceWorker(
|
||||||
urlToHash,
|
urlToHash,
|
||||||
<String>[
|
<String>[
|
||||||
'/',
|
|
||||||
'main.dart.js',
|
'main.dart.js',
|
||||||
'index.html',
|
'index.html',
|
||||||
'assets/NOTICES',
|
'assets/NOTICES',
|
||||||
|
Loading…
Reference in New Issue
Block a user