nuxt-typed-router 2.0.1 → 2.0.2
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 +1 -1
- package/dist/module.mjs +4 -5
- package/package.json +1 -1
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { extendPages, defineNuxtModule } from '@nuxt/kit';
|
|
1
|
+
import { extendPages, defineNuxtModule, createResolver } from '@nuxt/kit';
|
|
3
2
|
import chalk from 'chalk';
|
|
4
3
|
import logSymbols from 'log-symbols';
|
|
5
4
|
import prettier from 'prettier';
|
|
6
5
|
import fs from 'fs';
|
|
6
|
+
import { fileURLToPath } from 'url';
|
|
7
7
|
import { dirname, resolve } from 'pathe';
|
|
8
8
|
import mkdirp from 'mkdirp';
|
|
9
9
|
import { camelCase } from 'lodash-es';
|
|
@@ -642,11 +642,10 @@ const module = defineNuxtModule({
|
|
|
642
642
|
setup(moduleOptions, nuxt) {
|
|
643
643
|
const srcDir = nuxt.options.srcDir;
|
|
644
644
|
const { plugin } = moduleOptions;
|
|
645
|
+
const { resolve } = createResolver(import.meta.url);
|
|
645
646
|
nuxt.options.alias = {
|
|
646
647
|
...nuxt.options.alias,
|
|
647
|
-
"@typed-router":
|
|
648
|
-
new URL(`${nuxt.options.rootDir}/.nuxt/typed-router`, import.meta.url)
|
|
649
|
-
)
|
|
648
|
+
"@typed-router": resolve(`${nuxt.options.rootDir}/.nuxt/typed-router`)
|
|
650
649
|
};
|
|
651
650
|
nuxt.hook("pages:extend", () => createTypedRouter({ srcDir, nuxt, plugin }));
|
|
652
651
|
createTypedRouter({ srcDir, nuxt, plugin });
|