Skip to content

Commit f547beb

Browse files
committed
Fix png-to-ico ES Module import for GitHub Actions
1 parent 38523e0 commit f547beb

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "delay",
3-
"version": "1.0.2",
3+
"version": "1.0.3",
44
"description": "Notes, tasks, calendar & AI — beautifully organized.",
55
"author": "AzizX-coder",
66
"private": true,

scripts/make-icon.cjs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
const pngToIco = require("png-to-ico").default;
21
const fs = require("fs");
32
const path = require("path");
43

54
const pngPath = path.join(__dirname, "..", "public", "icon.png");
65
const icoPath = path.join(__dirname, "..", "public", "icon.ico");
76

8-
pngToIco(pngPath)
7+
import("png-to-ico")
8+
.then((module) => {
9+
const pngToIco = module.default || module;
10+
return pngToIco(pngPath);
11+
})
912
.then((buf) => {
1013
fs.writeFileSync(icoPath, buf);
1114
console.log("Created", icoPath);

0 commit comments

Comments
 (0)