import { createRequire } from "module";
const require = createRequire(import.meta.url);
const si = require("systeminformation");
Using commonJS and require with import in javascript
Sometimes we need to use import and require to use any lib in javascript, then here the way to use require along with import
Post a Comment
Post a Comment