diff --git a/package.json b/package.json index 65f6b82..93956f8 100644 --- a/package.json +++ b/package.json @@ -15,8 +15,8 @@ }, "description": "calmerger", "main": "server.js", - "type": "module", "author": "Ryan", + "type": "module", "license": "ISC", "devDependencies": { "@babel/preset-env": "^7.26.0", diff --git a/src/lib/ical.js b/src/lib/ical.cjs similarity index 100% rename from src/lib/ical.js rename to src/lib/ical.cjs diff --git a/src/lib/ical.timezones.js b/src/lib/ical.timezones.js index aebfa4a..3fcb1f7 100644 --- a/src/lib/ical.timezones.js +++ b/src/lib/ical.timezones.js @@ -1,4 +1,7 @@ -const ICAL = require('./ical.js'); +import { createRequire } from 'module'; +const require = createRequire(import.meta.url); + +const ICAL = require('./ical.cjs'); (function() { function register(tzdata) { ICAL.TimezoneService.register(ICAL.Component.fromString("BEGIN:VTIMEZONE\r\n" + tzdata + "\r\nEND:VTIMEZONE")) }; ICAL.TimezoneService.IANA_TZDB_VERSION = "2024b";