Skip to content

Commit

Permalink
chore: log with patch
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Nov 5, 2024
1 parent 62fa1d7 commit b5c0a58
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 40 deletions.
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@
"axios",
"vite"
]
},
"patchedDependencies": {
"@nuxt/kit": "patches/@nuxt__kit.patch"
}
},
"license": "MIT",
Expand Down
20 changes: 20 additions & 0 deletions patches/@nuxt__kit.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
diff --git a/dist/index.mjs b/dist/index.mjs
index 6d84162e54e2b02c48e024ce937903392e332ff4..5cc1a630dd69720667bd468944b1342154d9b830 100644
--- a/dist/index.mjs
+++ b/dist/index.mjs
@@ -2428,6 +2428,7 @@ const normalizeModuleTranspilePath = (p) => {
};
async function loadNuxtModuleInstance(nuxtModule, nuxt = useNuxt()) {
let buildTimeModuleMeta = {};
+ const orig = nuxtModule
const jiti = createJiti(nuxt.options.rootDir, { alias: nuxt.options.alias });
if (typeof nuxtModule === "string") {
const paths = [join(nuxtModule, "nuxt"), join(nuxtModule, "module"), nuxtModule, join(nuxt.options.rootDir, nuxtModule)];
@@ -2456,6 +2457,7 @@ async function loadNuxtModuleInstance(nuxtModule, nuxt = useNuxt()) {
}
}
if (typeof nuxtModule !== "function") {
+ console.log(orig, nuxtModule)
throw new TypeError("Nuxt module should be a function: " + nuxtModule);
}
return { nuxtModule, buildTimeModuleMeta };
Loading

0 comments on commit b5c0a58

Please sign in to comment.