Skip to content

Commit 1474a3a

Browse files
authored
Use default json import (anuraghazra#2820)
1 parent d5a4dbd commit 1474a3a

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

src/cards/wakatime-card.js

+1-11
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,7 @@ import {
1010
} from "../common/utils.js";
1111
import { getStyles } from "../getStyles.js";
1212
import { wakatimeCardLocales } from "../translations.js";
13-
14-
/** Import language colors.
15-
*
16-
* @description Here we use the workaround found in
17-
* https://stackoverflow.com/questions/66726365/how-should-i-import-json-in-node
18-
* since vercel is using v16.14.0 which does not yet support json imports without the
19-
* --experimental-json-modules flag.
20-
*/
21-
import { createRequire } from "module";
22-
const require = createRequire(import.meta.url);
23-
const languageColors = require("../common/languageColors.json"); // now works
13+
import languageColors from "../common/languageColors.json";
2414

2515
/**
2616
* Creates the no coding activity SVG node.

0 commit comments

Comments
 (0)