Fix fetch module import so that latest release version would be shown on website
This commit is contained in:
committed by
Umputun
parent
a4772bd9de
commit
d5e3602e54
+1
-1
@@ -10,7 +10,7 @@
|
||||
"node": ">=20.11.1",
|
||||
"yarn": ">=1.22"
|
||||
},
|
||||
"packageManager": "yarn@1.22.22",
|
||||
"packageManager": "yarn@1.22.22",
|
||||
"scripts": {
|
||||
"start": "npm-run-all dev",
|
||||
"dev": "npm-run-all -l clean build:css -p dev:css dev:11ty",
|
||||
|
||||
@@ -6,7 +6,7 @@ module.exports = async function getLatestReleaseVersion() {
|
||||
return currentData
|
||||
}
|
||||
try {
|
||||
const fetch = await import('node-fetch')
|
||||
const fetch = (await import('node-fetch')).default;
|
||||
const res = await fetch(
|
||||
'https://api.github.com/repos/umputun/remark42/releases'
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user