租房小程序前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
733 B

3 months ago
  1. /**
  2. * @fileoverview Universal module importer
  3. */
  4. //-----------------------------------------------------------------------------
  5. // Imports
  6. //-----------------------------------------------------------------------------
  7. import { createRequire } from "module";
  8. import { fileURLToPath } from "url";
  9. import { dirname } from "path";
  10. //-----------------------------------------------------------------------------
  11. // Helpers
  12. //-----------------------------------------------------------------------------
  13. const __filename = fileURLToPath(import.meta.url);
  14. const __dirname = dirname(__filename);
  15. const require = createRequire(__dirname + "/");
  16. const { ModuleImporter } = require("./module-importer.cjs");
  17. export { ModuleImporter };