diff --git a/packages/mermaid/src/diagrams/gantt/ganttDb.js b/packages/mermaid/src/diagrams/gantt/ganttDb.js index fa872027d..006d4e7a6 100644 --- a/packages/mermaid/src/diagrams/gantt/ganttDb.js +++ b/packages/mermaid/src/diagrams/gantt/ganttDb.js @@ -1,8 +1,8 @@ import { sanitizeUrl } from '@braintree/sanitize-url'; -import dayjs from 'dayjs'; -import dayjsIsoWeek from 'dayjs/plugin/isoWeek.js'; -import dayjsCustomParseFormat from 'dayjs/plugin/customParseFormat.js'; -import dayjsAdvancedFormat from 'dayjs/plugin/advancedFormat.js'; +import dayjs from 'dayjs/esm'; +import dayjsIsoWeek from 'dayjs/esm/plugin/isoWeek'; +import dayjsCustomParseFormat from 'dayjs/esm/plugin/customParseFormat'; +import dayjsAdvancedFormat from 'dayjs/esm/plugin/advancedFormat'; import { log } from '../../logger'; import * as configApi from '../../config'; import utils from '../../utils'; diff --git a/packages/mermaid/src/diagrams/gantt/ganttDb.spec.ts b/packages/mermaid/src/diagrams/gantt/ganttDb.spec.ts index 812cfd9b8..42eee3034 100644 --- a/packages/mermaid/src/diagrams/gantt/ganttDb.spec.ts +++ b/packages/mermaid/src/diagrams/gantt/ganttDb.spec.ts @@ -1,5 +1,5 @@ // @ts-nocheck TODO: Fix TS -import dayjs from 'dayjs'; +import dayjs from 'dayjs/esm'; import ganttDb from './ganttDb'; import { convert } from '../../tests/util'; diff --git a/packages/mermaid/src/diagrams/gantt/ganttRenderer.js b/packages/mermaid/src/diagrams/gantt/ganttRenderer.js index 78bf2fcea..3252194ca 100644 --- a/packages/mermaid/src/diagrams/gantt/ganttRenderer.js +++ b/packages/mermaid/src/diagrams/gantt/ganttRenderer.js @@ -1,4 +1,4 @@ -import dayjs from 'dayjs'; +import dayjs from 'dayjs/esm'; import { log } from '../../logger'; import { select, diff --git a/packages/mermaid/src/logger.ts b/packages/mermaid/src/logger.ts index 44b98315c..b45a5bcba 100644 --- a/packages/mermaid/src/logger.ts +++ b/packages/mermaid/src/logger.ts @@ -2,7 +2,7 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ /* eslint-disable @typescript-eslint/no-empty-function */ /* eslint-disable no-console */ -import dayjs from 'dayjs'; +import dayjs from 'dayjs/esm'; export type LogLevel = 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'fatal';