@constatic/base 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/modules.js +3 -3
- package/package.json +1 -1
package/dist/modules.js
CHANGED
|
@@ -4,14 +4,14 @@ import { glob } from "tinyglobby";
|
|
|
4
4
|
async function loadModules(meta, modules = []) {
|
|
5
5
|
const ignore = modules.filter((path) => path.charAt(0) == "!").map((path) => path.slice(1));
|
|
6
6
|
const filepaths = await glob(modules, { cwd: meta.dirname, ignore });
|
|
7
|
-
const
|
|
7
|
+
const loadedModules = [];
|
|
8
8
|
for (const path of filepaths) {
|
|
9
|
-
await import(join(meta.dirname, path)).then((imported) =>
|
|
9
|
+
await import("file://" + join(meta.dirname, path)).then((imported) => loadedModules.push({
|
|
10
10
|
module: imported,
|
|
11
11
|
filepath: path
|
|
12
12
|
}));
|
|
13
13
|
}
|
|
14
|
-
return
|
|
14
|
+
return loadedModules;
|
|
15
15
|
}
|
|
16
16
|
export {
|
|
17
17
|
loadModules
|