@nuxt/kit-nightly 4.5.0-29703645.7aa31156 → 4.5.0-29705236.f2ca6ea5

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.
Files changed (2) hide show
  1. package/dist/index.mjs +5 -4
  2. package/package.json +2 -2
package/dist/index.mjs CHANGED
@@ -164,7 +164,7 @@ function _defineNuxtModule(definition) {
164
164
  const moduleName = uniqueKey || module.meta.name || "<no name>";
165
165
  nuxt._perf?.startPhase(`module:${moduleName}`);
166
166
  const start = performance.now();
167
- let res = {};
167
+ let res;
168
168
  try {
169
169
  res = await module.setup?.call(null, _options, nuxt) ?? {};
170
170
  } finally {
@@ -692,10 +692,10 @@ async function loadNuxtModuleInstance(nuxtModule, nuxt = useNuxt()) {
692
692
  };
693
693
  } catch (error) {
694
694
  const code = error.code;
695
- if (code === "ERR_PACKAGE_PATH_NOT_EXPORTED" || code === "ERR_UNSUPPORTED_DIR_IMPORT" || code === "ENOTDIR") throw new TypeError(`Could not load \`${nuxtModule}\`. Is it installed?`);
695
+ if (code === "ERR_PACKAGE_PATH_NOT_EXPORTED" || code === "ERR_UNSUPPORTED_DIR_IMPORT" || code === "ENOTDIR") throw new TypeError(`Could not load \`${nuxtModule}\`. Is it installed?`, { cause: error });
696
696
  if (code === "MODULE_NOT_FOUND" || code === "ERR_MODULE_NOT_FOUND") {
697
697
  const module = MissingModuleMatcher.exec(error.message)?.[1];
698
- if (module && !module.includes(nuxtModule)) throw new TypeError(`Error while importing module \`${nuxtModule}\`: ${error}`);
698
+ if (module && !module.includes(nuxtModule)) throw new TypeError(`Error while importing module \`${nuxtModule}\`: ${error}`, { cause: error });
699
699
  }
700
700
  }
701
701
  throw new TypeError(`Could not load \`${nuxtModule}\`. Is it installed?`);
@@ -1284,7 +1284,8 @@ function resolveLayerPaths(dirs, projectBuildDir) {
1284
1284
  join(relativeRootDir, `.config/nuxt.*`),
1285
1285
  join(relativeRootDir, `layers/*/nuxt.config.*`),
1286
1286
  join(relativeRootDir, `layers/*/.config/nuxt.*`),
1287
- join(relativeRootDir, `layers/*/modules/**/*`)
1287
+ join(relativeRootDir, `layers/*/modules/*.*`),
1288
+ join(relativeRootDir, `layers/*/modules/*/*.*`)
1288
1289
  ],
1289
1290
  shared: [
1290
1291
  join(relativeSharedDir, `**/*`),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxt/kit-nightly",
3
- "version": "4.5.0-29703645.7aa31156",
3
+ "version": "4.5.0-29705236.f2ca6ea5",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/nuxt/nuxt.git",
@@ -41,7 +41,7 @@
41
41
  "untyped": "^2.0.0"
42
42
  },
43
43
  "devDependencies": {
44
- "@nuxt/schema": "npm:@nuxt/schema-nightly@4.5.0-29703645.7aa31156",
44
+ "@nuxt/schema": "npm:@nuxt/schema-nightly@4.5.0-29705236.f2ca6ea5",
45
45
  "@rspack/core": "2.0.6",
46
46
  "@types/semver": "7.7.1",
47
47
  "hookable": "6.1.1",