From aae0c9dc2da0c964cb1c9d4ddd78aeb4b2f1e420 Mon Sep 17 00:00:00 2001 From: Akira Hayashi Date: Mon, 17 Jun 2024 22:04:21 +0900 Subject: [PATCH] Import `dayjs` plugins as ESmodule to resolve runtime error --- src/cost.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cost.ts b/src/cost.ts index 9046427..bb70440 100644 --- a/src/cost.ts +++ b/src/cost.ts @@ -1,7 +1,7 @@ import AWS from 'aws-sdk'; import dayjs from 'dayjs'; -import isSameOrAfter from 'dayjs/plugin/isSameOrAfter'; -import isSameOrBefore from 'dayjs/plugin/isSameOrBefore'; +import isSameOrAfter from 'dayjs/plugin/isSameOrAfter.js'; +import isSameOrBefore from 'dayjs/plugin/isSameOrBefore.js'; dayjs.extend(isSameOrAfter); dayjs.extend(isSameOrBefore); import { AWSConfig } from './config';