nuxt-link-checker 0.1.5 → 0.1.6

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/module.json CHANGED
@@ -5,5 +5,5 @@
5
5
  "bridge": false
6
6
  },
7
7
  "configKey": "linkChecker",
8
- "version": "0.1.5"
8
+ "version": "0.1.6"
9
9
  }
package/dist/module.mjs CHANGED
@@ -62,6 +62,8 @@ const module = defineNuxtModule({
62
62
  };
63
63
  },
64
64
  setup(config, nuxt) {
65
+ if (nuxt.options.dev)
66
+ return;
65
67
  nuxt.hooks.hook("nitro:init", async (nitro) => {
66
68
  const invalidRoutes = {};
67
69
  nitro.hooks.hook("prerender:generate", async (ctx) => {
@@ -71,8 +73,10 @@ const module = defineNuxtModule({
71
73
  invalidRoutes[ctx.route] = ctx.error.statusCode;
72
74
  });
73
75
  nitro.hooks.hook("close", async () => {
74
- nitro.logger.info("Scanning routes for broken links...");
75
76
  const links = Object.entries(linkMap);
77
+ if (!links.length)
78
+ return;
79
+ nitro.logger.info("Scanning routes for broken links...");
76
80
  let routeCount = 0;
77
81
  let badLinkCount = 0;
78
82
  links.forEach(([route, routes]) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nuxt-link-checker",
3
3
  "type": "module",
4
- "version": "0.1.5",
4
+ "version": "0.1.6",
5
5
  "packageManager": "pnpm@7.18.0",
6
6
  "license": "MIT",
7
7
  "funding": "https://github.com/sponsors/harlan-zw",