mirror of
https://github.com/System-End/github-readme-stats.git
synced 2026-04-20 00:35:23 +00:00
Use default json import (#2820)
This commit is contained in:
parent
d5a4dbdc7e
commit
1474a3abbe
1 changed files with 1 additions and 11 deletions
|
|
@ -10,17 +10,7 @@ import {
|
|||
} from "../common/utils.js";
|
||||
import { getStyles } from "../getStyles.js";
|
||||
import { wakatimeCardLocales } from "../translations.js";
|
||||
|
||||
/** Import language colors.
|
||||
*
|
||||
* @description Here we use the workaround found in
|
||||
* https://stackoverflow.com/questions/66726365/how-should-i-import-json-in-node
|
||||
* since vercel is using v16.14.0 which does not yet support json imports without the
|
||||
* --experimental-json-modules flag.
|
||||
*/
|
||||
import { createRequire } from "module";
|
||||
const require = createRequire(import.meta.url);
|
||||
const languageColors = require("../common/languageColors.json"); // now works
|
||||
import languageColors from "../common/languageColors.json";
|
||||
|
||||
/**
|
||||
* Creates the no coding activity SVG node.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue