We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 32fb265 commit 75c2658Copy full SHA for 75c2658
1 file changed
src/utils/date.ts
@@ -1,4 +1,11 @@
1
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
9
import advancedFormat from 'dayjs/plugin/advancedFormat.js';
10
import customParseFormat from 'dayjs/plugin/customParseFormat.js';
11
import duration from 'dayjs/plugin/duration.js';
0 commit comments