Skip to content

Instantly share code, notes, and snippets.

@Syakhisk
Created May 17, 2022 07:47
Show Gist options
  • Save Syakhisk/91bb61deb1666dc20f4a885778e71250 to your computer and use it in GitHub Desktop.
Save Syakhisk/91bb61deb1666dc20f4a885778e71250 to your computer and use it in GitHub Desktop.
use import and require node js
import { createRequire } from "module";
const require = createRequire(import.meta.url);
const data = require("./data.json");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment