I have a project which is build using require, but now I need to use a package @nfteyez/sol-rayz, which only have support for ES6 import.
I cannot add type: module because there are lots of files.
I have tried changing file to mjs, but I get errors when importing it with require in another file.
I found in example that is possible when you enable module you can use import with:
// Define "require"
import { createRequire } from "module";
const require = createRequire(import.meta.url);
is there something similar for import? I am using node v17