A part of my index.html code used to be like below. I use to run a script to create buildVersion directory, move assets there and template the {{buildVersion}} after the flutter build web
job completes which would solve the cache issue related to assets (js files, images) on each layer of my infra (cloudflare, browser etc..)
entrypointUrl: "/a/{{buildVersion}}/main.dart.js",
serviceWorker: {
serviceWorkerVersion: serviceWorkerVersion,
serviceWorkerUrl: "{{buildVersion}}/flutter_service_worker.js?v=" + serviceWorkerVersion
},
Flutter seems to have deprecated this function and insists using the _flutter.loader.load()
api with which I am unable to configure my entrypoint (main.dart.js). Is there a better way to resolve the cache issue with the new paradigm? I was not able to find any documentation around it..
Thanks in advance!!