Add flutter_bootstrap.js

This commit is contained in:
Feodor Fitsner 2024-10-14 14:37:18 -07:00
parent b26b69471d
commit f461be131a
2 changed files with 13 additions and 3 deletions

View File

@ -0,0 +1,12 @@
{{ '{{flutter_js}}' }}
{{ '{{flutter_build_config}}' }}
_flutter.loader.load({
serviceWorkerSettings: {
serviceWorkerVersion: {{ '{{flutter_service_worker_version}}' }},
},
onEntrypointLoaded: async function (engineInitializer) {
const appRunner = await engineInitializer.initializeEngine({useColorEmoji: useColorEmoji});
await appRunner.runApp();
}
});

View File

@ -33,9 +33,7 @@
</head> </head>
<body> <body>
<script> <script src="flutter_bootstrap.js" async></script>
{{ '{{flutter_bootstrap_js}}' }}
</script>
</body> </body>
</html> </html>