diff --git a/packages/mermaid/src/diagrams/gantt/ganttDb.js b/packages/mermaid/src/diagrams/gantt/ganttDb.js index fa872027d..6ce5336fd 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/index.js'; +import dayjsIsoWeek from 'dayjs/esm/plugin/isoWeek/index.js'; +import dayjsCustomParseFormat from 'dayjs/esm/plugin/customParseFormat/index.js'; +import dayjsAdvancedFormat from 'dayjs/esm/plugin/advancedFormat/index.js'; 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..7dc2e2a59 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/index.js'; 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..fb692828f 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/index.js'; import { log } from '../../logger'; import { select, diff --git a/packages/mermaid/src/logger.ts b/packages/mermaid/src/logger.ts index 44b98315c..da5e8a221 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/index.js'; export type LogLevel = 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'fatal';