mirror of
https://github.com/scratchfoundation/scratch-desktop.git
synced 2024-12-22 13:42:27 -05:00
Show splash screen ASAP, load render JS async
This commit is contained in:
parent
414a1f0cfd
commit
f57320e718
3 changed files with 23 additions and 1 deletions
|
@ -3,6 +3,7 @@
|
|||
"webpackConfig": "webpack.main.additions.js"
|
||||
},
|
||||
"renderer": {
|
||||
"template": "src/renderer/index.html",
|
||||
"webpackConfig": "webpack.renderer.additions.js"
|
||||
}
|
||||
}
|
||||
|
|
19
src/renderer/index.html
Normal file
19
src/renderer/index.html
Normal file
|
@ -0,0 +1,19 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<style>
|
||||
.splash {
|
||||
font-size: xx-large;
|
||||
margin: 0;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"><p class="splash">Scratch Desktop is loading...</p></div>
|
||||
</body>
|
||||
</html>
|
|
@ -1 +1,3 @@
|
|||
import './app.jsx';
|
||||
// this is an async import so that it doesn't block the first render
|
||||
// index.html contains a loading/splash screen which will display while this import loads
|
||||
import('./app.jsx');
|
||||
|
|
Loading…
Reference in a new issue