File tree 1 file changed +11
-1
lines changed
1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,17 @@ import {
10
10
} from "../common/utils.js" ;
11
11
import { getStyles } from "../getStyles.js" ;
12
12
import { wakatimeCardLocales } from "../translations.js" ;
13
- import languageColors from "../common/languageColors.json" ;
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
14
24
15
25
/**
16
26
* Creates the no coding activity SVG node.
You can’t perform that action at this time.
0 commit comments