Skip to content

Commit 75c2658

Browse files
committed
chore: 🤖 add note and TODO
1 parent 32fb265 commit 75c2658

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/utils/date.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
import dayjs, { Dayjs } from 'dayjs';
2+
// NOTE: Explicit `.js` extension in dayjs
3+
// to ensure strict ESM compatibility for
4+
// consumers using "type": "module".
5+
// E.g. if the package doesn’t define subpaths
6+
// in exports resolution would fail in ESM environments
7+
// TODO: Maybe create a vite plugin to detect
8+
// if a package has missing exports and add extension
29
import advancedFormat from 'dayjs/plugin/advancedFormat.js';
310
import customParseFormat from 'dayjs/plugin/customParseFormat.js';
411
import duration from 'dayjs/plugin/duration.js';

0 commit comments

Comments
 (0)