Skip to content

Commit 14d7e6d

Browse files
committed
Fix preload
1 parent cc0ca10 commit 14d7e6d

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "interslavic",
3-
"version": "1.25.6",
3+
"version": "1.25.7",
44
"description": "Interslavic Dictionary",
55
"license": "MIT",
66
"author": {

src/index.html.ejs

+6-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@
2929
content="It is a dictionary of the Interslavic language with translations into most of the Slavic languages, as well as into English, German and others. The project is being developed by a community of fans of this zonal constructed language.">
3030
</head>
3131
<body>
32-
<script>
32+
<script async>
33+
if (process.env.NODE_ENV !== 'production') {
34+
// eslint-disable-next-line no-console
35+
console.time('DATA')
36+
}
3337
window.INTERSLAVIC_PRELOAD = {}
3438
INTERSLAVIC_PRELOAD['data/basic.json'] = fetch('data/basic.json').then((res) => res.json())
3539
INTERSLAVIC_PRELOAD['data/translateStatistic.json'] = fetch('data/translateStatistic.json').then((res) => res.json())
@@ -64,7 +68,7 @@
6468
<a href="https://github.com/sonic16x/interslavic">https://github.com/sonic16x/interslavic</a>
6569
</noscript>
6670
<div id="app"></div>
67-
<script>
71+
<script defer>
6872
const theme = JSON.parse(localStorage.getItem('reduxState'))?.colorTheme
6973
7074
if (theme) {

src/services/fetchDictionary.ts

+2
Original file line numberDiff line numberDiff line change
@@ -69,5 +69,7 @@ export async function fetchDictionary(langList: string[]) {
6969
console.info('FID', `${fidTime}ms`)
7070
// eslint-disable-next-line no-console
7171
console.info('INIT', `${initTime}ms`)
72+
// eslint-disable-next-line no-console
73+
console.timeEnd('DATA')
7274
}
7375
}

0 commit comments

Comments
 (0)