| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent b1e2a38 commit e683077
4 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -447,7 +447,8 @@ Module._load = function(request, parent, isMain) { | |||
| 447 | 447 | ESMLoader = new Loader(); | |
| 448 | 448 | const userLoader = process.binding('config').userLoader; | |
| 449 | 449 | if (userLoader) { | |
| 450 | - const hooks = await new Loader().import(userLoader); | ||
| 450 | + const hooks = await ESMLoader.import(userLoader); | ||
| 451 | + ESMLoader = new Loader(); | ||
| 451 | 452 | ESMLoader.hook(hooks); | |
| 452 | 453 | } | |
| 453 | 454 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,5 @@ | |||
| 1 | + // Flags: --experimental-modules --loader ./test/fixtures/es-module-loaders/loader-with-dep.mjs | ||
| 2 | + /* eslint-disable required-modules */ | ||
| 3 | + import './test-esm-ok.mjs'; | ||
| 4 | + | ||
| 5 | + // We just test that this module doesn't fail loading | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1 @@ | |||
| 1 | + exports.format = 'esm'; | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,7 @@ | |||
| 1 | + import dep from './loader-dep.js'; | ||
| 2 | + export function resolve (specifier, base, defaultResolve) { | ||
| 3 | + return { | ||
| 4 | + url: defaultResolve(specifier, base).url, | ||
| 5 | + format: dep.format | ||
| 6 | + }; | ||
| 7 | + } | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments