main
Last change
on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
733 bytes
|
Rev | Line | |
---|
[d565449] | 1 | /**
|
---|
| 2 | * @fileoverview Universal module importer
|
---|
| 3 | */
|
---|
| 4 |
|
---|
| 5 | //-----------------------------------------------------------------------------
|
---|
| 6 | // Imports
|
---|
| 7 | //-----------------------------------------------------------------------------
|
---|
| 8 |
|
---|
| 9 | import { createRequire } from "module";
|
---|
| 10 | import { fileURLToPath } from "url";
|
---|
| 11 | import { dirname } from "path";
|
---|
| 12 |
|
---|
| 13 | //-----------------------------------------------------------------------------
|
---|
| 14 | // Helpers
|
---|
| 15 | //-----------------------------------------------------------------------------
|
---|
| 16 |
|
---|
| 17 | const __filename = fileURLToPath(import.meta.url);
|
---|
| 18 | const __dirname = dirname(__filename);
|
---|
| 19 | const require = createRequire(__dirname + "/");
|
---|
| 20 | const { ModuleImporter } = require("./module-importer.cjs");
|
---|
| 21 |
|
---|
| 22 | export { ModuleImporter };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.