Skip to content

Commit

Permalink
Use default json import (anuraghazra#2820)
Browse files Browse the repository at this point in the history
  • Loading branch information
qwerty541 authored Jun 15, 2023
1 parent d5a4dbd commit 1474a3a
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/cards/wakatime-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 1474a3a

Please sign in to comment.