Just edit the index.html as this:
<!-- replace this -->
<!-- <script src="flutter_bootstrap.js" async></script> -->
<!-- with this -->
<script>
{{flutter_js}}
{{flutter_build_config}}
_flutter.loader.loadEntrypoint({
onEntrypointLoaded: async function (engineInitializer) {
let appRunner = await engineInitializer.initializeEngine({
// JsFlutterConfiguration goes here...
canvasKitBaseUrl: "/canvaskit/",
});
appRunner.runApp();
},
});
</script>
References:
Flutter web app initialization documentation provides the custom bootstrap script template.
Source code of flutter engine's configuration indicates that window.flutterConfiguration
is now deprecated.