next-vite-router 1.2.3 → 1.3.0
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/README.md +39 -13
- package/dist/cli.cjs +1 -1
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +144 -0
- package/dist/index.d.ts +50 -1
- package/dist/index.js +201 -167
- package/dist/plugin.cjs +63 -0
- package/dist/plugin.d.cts +12 -0
- package/dist/plugin.js +118 -97
- package/dist/tree-DfnssFxU.js +143 -0
- package/dist/tree-hc1dSMdb.cjs +10 -0
- package/package.json +20 -7
- package/dist/tree-HwBRWJNI.js +0 -64
package/dist/index.js
CHANGED
|
@@ -1,193 +1,227 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as
|
|
3
|
-
import
|
|
4
|
-
import { useParams as
|
|
5
|
-
const
|
|
1
|
+
import { p as h, r as F, b } from "./tree-DfnssFxU.js";
|
|
2
|
+
import { a as et, c as nt, e as rt, n as at } from "./tree-DfnssFxU.js";
|
|
3
|
+
import u, { lazy as v, Suspense as z, createContext as $, useContext as A } from "react";
|
|
4
|
+
import { useParams as k } from "react-router-dom";
|
|
5
|
+
const d = {
|
|
6
6
|
enableLazyLoading: !0
|
|
7
7
|
};
|
|
8
|
-
let
|
|
9
|
-
function
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
function
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
function
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
function
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
8
|
+
let i = { ...d };
|
|
9
|
+
function U(t) {
|
|
10
|
+
i = { ...i, ...t };
|
|
11
|
+
}
|
|
12
|
+
function V() {
|
|
13
|
+
i = { ...d };
|
|
14
|
+
}
|
|
15
|
+
function N() {
|
|
16
|
+
return i;
|
|
17
|
+
}
|
|
18
|
+
let p = [];
|
|
19
|
+
function W(t, e) {
|
|
20
|
+
p.push({ pattern: t, middleware: e });
|
|
21
|
+
}
|
|
22
|
+
function X() {
|
|
23
|
+
p = [];
|
|
24
|
+
}
|
|
25
|
+
function R(t, e) {
|
|
26
|
+
let r = e;
|
|
27
|
+
for (const n of p)
|
|
28
|
+
n.pattern.lastIndex = 0, n.pattern.test(t) && (r = n.middleware(r)), n.pattern.lastIndex = 0;
|
|
29
|
+
return r;
|
|
30
|
+
}
|
|
31
|
+
const M = () => u.createElement("div"), m = /* @__PURE__ */ new Map();
|
|
32
|
+
function T() {
|
|
33
|
+
const t = N();
|
|
34
|
+
if (t.enableLazyLoading === !1)
|
|
35
|
+
return null;
|
|
36
|
+
const e = t.loadingFallback || M;
|
|
37
|
+
return u.createElement(e);
|
|
38
|
+
}
|
|
39
|
+
function Y() {
|
|
40
|
+
m.clear();
|
|
41
|
+
}
|
|
42
|
+
function C(t, e, r) {
|
|
43
|
+
let n = m.get(e);
|
|
44
|
+
n || (n = v(t), m.set(e, n));
|
|
45
|
+
const a = u.createElement(
|
|
46
|
+
z,
|
|
47
|
+
{ fallback: u.createElement(T) },
|
|
48
|
+
u.createElement(n)
|
|
46
49
|
);
|
|
47
|
-
return
|
|
50
|
+
return r ? R(r, a) : a;
|
|
48
51
|
}
|
|
49
|
-
const
|
|
50
|
-
function
|
|
51
|
-
name:
|
|
52
|
-
children:
|
|
52
|
+
const y = $(void 0);
|
|
53
|
+
function I({
|
|
54
|
+
name: t,
|
|
55
|
+
children: e
|
|
53
56
|
}) {
|
|
54
|
-
return
|
|
55
|
-
|
|
56
|
-
{ value:
|
|
57
|
-
|
|
57
|
+
return u.createElement(
|
|
58
|
+
y.Provider,
|
|
59
|
+
{ value: t },
|
|
60
|
+
e
|
|
58
61
|
);
|
|
59
62
|
}
|
|
60
|
-
function
|
|
61
|
-
return
|
|
62
|
-
}
|
|
63
|
-
function
|
|
64
|
-
return
|
|
65
|
-
}
|
|
66
|
-
function
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
63
|
+
function S() {
|
|
64
|
+
return A(y);
|
|
65
|
+
}
|
|
66
|
+
function P(t, e) {
|
|
67
|
+
return R(t, u.createElement(e));
|
|
68
|
+
}
|
|
69
|
+
function D(t) {
|
|
70
|
+
const e = h(t)[0];
|
|
71
|
+
return (e == null ? void 0 : e.kind) === "catchAll" && e.optional;
|
|
72
|
+
}
|
|
73
|
+
function g(t) {
|
|
74
|
+
const e = h(t)[0];
|
|
75
|
+
return e ? F(e) : "";
|
|
76
|
+
}
|
|
77
|
+
function c(t, e) {
|
|
78
|
+
return f(t, e, !0);
|
|
79
|
+
}
|
|
80
|
+
function f(t, e, r = !1) {
|
|
81
|
+
const n = t.page;
|
|
82
|
+
if (!n)
|
|
83
|
+
throw new Error(`Route node "${t.fullPath}" has no page loader`);
|
|
84
|
+
const a = C(
|
|
85
|
+
async () => ({ default: (await n()).default }),
|
|
86
|
+
`page:${t.fullPath || e}`,
|
|
87
|
+
e
|
|
88
|
+
), o = h(t.segment)[0], l = (o == null ? void 0 : o.kind) === "catchAll" ? u.createElement(I, {
|
|
89
|
+
name: o.name,
|
|
79
90
|
children: a
|
|
80
91
|
}) : a;
|
|
81
|
-
return
|
|
92
|
+
return r ? { index: !0, element: l } : { path: g(t.segment), element: l };
|
|
82
93
|
}
|
|
83
|
-
function
|
|
84
|
-
const
|
|
85
|
-
if (!
|
|
86
|
-
throw new Error(`Route node "${
|
|
87
|
-
const
|
|
94
|
+
function G(t) {
|
|
95
|
+
const e = t.notFound;
|
|
96
|
+
if (!e)
|
|
97
|
+
throw new Error(`Route node "${t.fullPath}" has no not-found loader`);
|
|
98
|
+
const r = t.fullPath ? `/${t.fullPath}` : "/";
|
|
88
99
|
return {
|
|
89
100
|
path: "*",
|
|
90
|
-
element:
|
|
91
|
-
async () => ({ default: (await
|
|
92
|
-
`notfound:${
|
|
93
|
-
|
|
101
|
+
element: C(
|
|
102
|
+
async () => ({ default: (await e()).default }),
|
|
103
|
+
`notfound:${t.fullPath}`,
|
|
104
|
+
r
|
|
94
105
|
)
|
|
95
106
|
};
|
|
96
107
|
}
|
|
97
|
-
function
|
|
98
|
-
|
|
99
|
-
return [...e.children.entries()].sort(([r], [a]) => r.localeCompare(a)).forEach(([r, a]) => {
|
|
100
|
-
const l = p(r), o = l ? t ? `${t}/${l}` : `/${l}` : t;
|
|
101
|
-
n.push(...$(a, !1, o));
|
|
102
|
-
}), n;
|
|
108
|
+
function E(t) {
|
|
109
|
+
return t.notFound ? [G(t)] : [];
|
|
103
110
|
}
|
|
104
|
-
function
|
|
105
|
-
|
|
106
|
-
|
|
111
|
+
function O(t, e, r, n) {
|
|
112
|
+
return {
|
|
113
|
+
...e ? { path: e } : {},
|
|
114
|
+
element: P(t, r),
|
|
115
|
+
children: n.length > 0 ? n : void 0
|
|
116
|
+
};
|
|
107
117
|
}
|
|
108
|
-
function
|
|
118
|
+
function w(t, e) {
|
|
109
119
|
const r = [];
|
|
110
|
-
|
|
111
|
-
const
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
const u = E(e, o);
|
|
130
|
-
return [{
|
|
131
|
-
...l ? {} : { path: a },
|
|
132
|
-
element: y(o, e.layout),
|
|
133
|
-
children: u.length > 0 ? u : void 0
|
|
134
|
-
}];
|
|
135
|
-
}
|
|
136
|
-
if (e.page && !l) {
|
|
137
|
-
if (T(e.segment)) {
|
|
138
|
-
const u = f(e, n, !0), x = {
|
|
139
|
-
path: a,
|
|
140
|
-
element: f(e, o).element,
|
|
141
|
-
children: [...s, ...i].length > 0 ? [...s, ...i] : void 0
|
|
142
|
-
};
|
|
143
|
-
return [u, x];
|
|
144
|
-
}
|
|
145
|
-
return s.length > 0 || i.length > 0 ? [{
|
|
146
|
-
path: a,
|
|
147
|
-
children: [
|
|
148
|
-
f(e, o, !0),
|
|
149
|
-
...s,
|
|
150
|
-
...i
|
|
151
|
-
]
|
|
152
|
-
}] : [{
|
|
153
|
-
path: a,
|
|
154
|
-
element: f(e, o).element
|
|
155
|
-
}];
|
|
156
|
-
}
|
|
157
|
-
if (e.page || e.notFound || !l) {
|
|
158
|
-
const u = [
|
|
159
|
-
...e.page ? [f(e, o, !0)] : [],
|
|
160
|
-
...s,
|
|
161
|
-
...i
|
|
120
|
+
return [...t.children.entries()].sort(([n], [a]) => n.localeCompare(a)).forEach(([n, a]) => {
|
|
121
|
+
const o = g(n), l = o ? e ? `${e}/${o}` : `/${o}` : e;
|
|
122
|
+
r.push(...x(a, !1, l));
|
|
123
|
+
}), r;
|
|
124
|
+
}
|
|
125
|
+
function L(t, e) {
|
|
126
|
+
const r = [];
|
|
127
|
+
return t.page && r.push(c(t, e || "/")), r.push(...w(t, e)), r.push(...E(t)), r;
|
|
128
|
+
}
|
|
129
|
+
function j(t, e, r, n, a, o) {
|
|
130
|
+
if (D(t.segment)) {
|
|
131
|
+
const l = [...a, ...o];
|
|
132
|
+
return [
|
|
133
|
+
c(t, e),
|
|
134
|
+
{
|
|
135
|
+
path: n,
|
|
136
|
+
element: f(t, r).element,
|
|
137
|
+
children: l.length > 0 ? l : void 0
|
|
138
|
+
}
|
|
162
139
|
];
|
|
163
|
-
return [{
|
|
164
|
-
...l ? {} : { path: a },
|
|
165
|
-
children: u.length > 0 ? u : void 0
|
|
166
|
-
}];
|
|
167
140
|
}
|
|
168
|
-
return
|
|
169
|
-
|
|
170
|
-
|
|
141
|
+
return a.length > 0 || o.length > 0 ? [{
|
|
142
|
+
path: n,
|
|
143
|
+
children: [
|
|
144
|
+
c(t, r),
|
|
145
|
+
...a,
|
|
146
|
+
...o
|
|
147
|
+
]
|
|
148
|
+
}] : [{
|
|
149
|
+
path: n,
|
|
150
|
+
element: f(t, r).element
|
|
151
|
+
}];
|
|
152
|
+
}
|
|
153
|
+
function q(t, e, r, n) {
|
|
154
|
+
const a = [
|
|
155
|
+
...t.page ? [c(t, e)] : [],
|
|
156
|
+
...r,
|
|
157
|
+
...n
|
|
158
|
+
];
|
|
159
|
+
return [{
|
|
160
|
+
children: a.length > 0 ? a : void 0
|
|
161
|
+
}];
|
|
162
|
+
}
|
|
163
|
+
function B(t) {
|
|
164
|
+
const e = L(t, "");
|
|
165
|
+
return t.layout ? [{
|
|
166
|
+
path: "/",
|
|
167
|
+
element: P("/", t.layout),
|
|
168
|
+
children: e
|
|
169
|
+
}] : t.page ? e.length > 1 ? [{ path: "/", children: e }] : [{
|
|
170
|
+
path: "/",
|
|
171
|
+
element: f(t, "/", !1).element
|
|
172
|
+
}] : t.notFound ? [{ path: "/", children: e }] : e;
|
|
173
|
+
}
|
|
174
|
+
function x(t, e = !1, r = "") {
|
|
175
|
+
if (e)
|
|
176
|
+
return B(t);
|
|
177
|
+
const n = g(t.segment), a = !n, o = a ? r : r + "/" + n, l = w(t, o), s = E(t);
|
|
178
|
+
return t.layout ? [O(
|
|
179
|
+
o,
|
|
180
|
+
a ? "" : n,
|
|
181
|
+
t.layout,
|
|
182
|
+
L(t, o)
|
|
183
|
+
)] : t.page && !a ? j(
|
|
184
|
+
t,
|
|
185
|
+
r,
|
|
186
|
+
o,
|
|
187
|
+
n,
|
|
188
|
+
l,
|
|
189
|
+
s
|
|
190
|
+
) : t.page || t.notFound || !a ? a ? q(t, o, l, s) : [{
|
|
191
|
+
path: n,
|
|
192
|
+
children: [
|
|
193
|
+
...t.page ? [c(t, o)] : [],
|
|
194
|
+
...l,
|
|
195
|
+
...s
|
|
196
|
+
]
|
|
197
|
+
}] : l;
|
|
198
|
+
}
|
|
199
|
+
function Z(t, e, r, n) {
|
|
171
200
|
return () => {
|
|
172
|
-
const a =
|
|
173
|
-
return
|
|
201
|
+
const a = b(t, e, r, n);
|
|
202
|
+
return x(a, !0);
|
|
174
203
|
};
|
|
175
204
|
}
|
|
176
|
-
function
|
|
177
|
-
const
|
|
178
|
-
return typeof
|
|
205
|
+
function _() {
|
|
206
|
+
const t = k(), e = S();
|
|
207
|
+
return typeof e == "string" && t["*"] !== void 0 ? { ...t, [e]: t["*"] } : t;
|
|
179
208
|
}
|
|
180
209
|
export {
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
210
|
+
I as CatchAllParamProvider,
|
|
211
|
+
et as assertNoDuplicateRoutes,
|
|
212
|
+
nt as assertNoRouteConflicts,
|
|
213
|
+
b as buildRouteTree,
|
|
214
|
+
Y as clearLazyCache,
|
|
215
|
+
X as clearMiddlewares,
|
|
216
|
+
U as configureRouter,
|
|
217
|
+
C as createLazyElement,
|
|
218
|
+
Z as createRouteGenerator,
|
|
219
|
+
rt as extractRoutePath,
|
|
220
|
+
at as normalizeSegment,
|
|
221
|
+
h as parseRouteSegments,
|
|
222
|
+
W as registerMiddleware,
|
|
223
|
+
V as resetRouterConfig,
|
|
224
|
+
F as routeSegmentToPath,
|
|
225
|
+
x as treeToRoutes,
|
|
226
|
+
_ as useParams
|
|
193
227
|
};
|
package/dist/plugin.cjs
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("node:fs"),m=require("node:path"),x=require("./tree-hc1dSMdb.cjs");function w(n){const a=n.map(x.routeSegmentToPath).filter(Boolean);return a.length>0?`/${a.join("/")}`:"/"}function S(n){const a=[["pagesDir",n.pagesDir],["pageFile",n.pageFile],["layoutFile",n.layoutFile],["notFoundFile",n.notFoundFile]];for(const[t,e]of a)if(!e.trim())throw new Error(`nextViteRouter option "${t}" must not be empty.`);const s=a.slice(1),i=s.find(([,t],e)=>s.slice(e+1).some(([,r])=>r===t));if(i)throw new Error(`nextViteRouter file options must be distinct; "${i[0]}" is duplicated.`)}function T(n){return n.replace(/\\/g,"/").replace(/^\.\//,"").replace(/^\/|\/$/g,"")}function k(n,a,s){const i=a.pageFile??"page.tsx",t=new Map;for(const e of R(n,i,s)){const r=x.extractRoutePath(e,a),l=x.parseRouteSegments(r),d=l.filter(u=>u.kind==="dynamic"||u.kind==="catchAll").map(u=>({name:u.name,optional:u.kind==="catchAll"&&u.optional})),c=w(l);t.set(c,{path:c,params:d});const f=l[l.length-1];if((f==null?void 0:f.kind)==="catchAll"&&f.optional){const u=w(l.slice(0,-1));t.has(u)||t.set(u,{path:u,params:[]})}}return[...t.values()].sort((e,r)=>e.path.localeCompare(r.path))}function R(n,a,s){const i=[];function t(e){for(const r of b.readdirSync(e,{withFileTypes:!0})){const l=m.join(e,r.name);if(r.isDirectory())t(l);else if(r.isFile()&&r.name===a){const d=m.relative(n,l).replace(/\\/g,"/");i.push(`/${s}/${d}`)}}}return b.existsSync(n)&&t(n),i}function G(n){const a=n.map(({path:i})=>` | ${JSON.stringify(i)}`).join(`
|
|
2
|
+
`),s=n.map(({path:i,params:t})=>{const e=t.length>0?[...t.map(({name:r,optional:l})=>` ${r}${l?"?":""}: string;`)].join(`
|
|
3
|
+
`):" [key: string]: never;";return` ${JSON.stringify(i)}: {
|
|
4
|
+
${e}
|
|
5
|
+
};`}).join(`
|
|
6
|
+
`);return`declare module 'virtual:next-vite-router' {
|
|
7
|
+
import type { ReactElement } from 'react';
|
|
8
|
+
import type { RouteObject } from 'react-router-dom';
|
|
9
|
+
|
|
10
|
+
export type RoutePath =
|
|
11
|
+
${a||' | "/"'};
|
|
12
|
+
|
|
13
|
+
export type RouteParams<P extends RoutePath> = P extends keyof RoutePathParams
|
|
14
|
+
? RoutePathParams[P]
|
|
15
|
+
: never;
|
|
16
|
+
|
|
17
|
+
export interface RoutePathParams {
|
|
18
|
+
${s}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export const generateRoutes: () => RouteObject[];
|
|
22
|
+
export function Router(): ReactElement | null;
|
|
23
|
+
export function useParams<T extends Record<string, string | undefined> = Record<string, string | undefined>>(): T;
|
|
24
|
+
export { Link, useRoutes } from 'react-router-dom';
|
|
25
|
+
}
|
|
26
|
+
`}function O(n={}){const{pagesDir:a="src/app",pageFile:s="page.tsx",layoutFile:i="layout.tsx",notFoundFile:t="not-found.tsx"}=n;S({pagesDir:a,pageFile:s,layoutFile:i,notFoundFile:t});const e=T(a),r={pagesDir:e,pageFile:s,layoutFile:i,notFoundFile:t},l="virtual:next-vite-router",d="\0"+l;let c="",f="",u,h;function F(){const o=G(k(c,r,e));b.writeFileSync(f,o,"utf-8")}return{name:"next-vite-router",configResolved(o){c=m.resolve(o.root,a),f=m.join(m.dirname(c),"virtual-next-vite-router.d.ts"),x.assertNoRouteConflicts(R(c,s,e),R(c,t,e),r),F()},configureServer(o){if(u===o)return;h==null||h(),u=o;const g=$=>{if(m.relative(c,$).startsWith("..")||![s,i,t].includes(m.basename($)))return;try{x.assertNoRouteConflicts(R(c,s,e),R(c,t,e),r)}catch(P){o.config.logger.error(P instanceof Error?P.message:String(P));return}F();const v=o.moduleGraph.getModuleById(d);v&&(o.moduleGraph.invalidateModule(v),p&&clearTimeout(p),p=setTimeout(()=>{p=void 0,o.ws.send({type:"full-reload",path:"*"})},0))};let p;const y=()=>{p&&(clearTimeout(p),p=void 0),o.watcher.off("add",g),o.watcher.off("unlink",g),o.watcher.off("close",y),u===o&&(u=void 0,h=void 0)};o.watcher.on("add",g),o.watcher.on("unlink",g),o.watcher.once("close",y),h=y},resolveId(o){if(o===l)return d},load(o){if(o===d){const g=`/${e}/**/${s}`,p=`/${e}/**/${i}`,y=`/${e}/**/${t}`;return`
|
|
27
|
+
import { buildRouteTree, treeToRoutes, normalizeSegment, createLazyElement, useParams } from 'next-vite-router';
|
|
28
|
+
import { Link, useRoutes } from 'react-router-dom';
|
|
29
|
+
|
|
30
|
+
const pagesGlob = import.meta.glob(${JSON.stringify(g)});
|
|
31
|
+
const layoutsGlob = import.meta.glob(${JSON.stringify(p)}, { eager: true });
|
|
32
|
+
const notFoundsGlob = import.meta.glob(${JSON.stringify(y)});
|
|
33
|
+
|
|
34
|
+
// Keep the raw root-relative glob keys. extractRoutePath (via buildRouteTree)
|
|
35
|
+
// is the single place that strips the pagesDir prefix; stripping it here as
|
|
36
|
+
// well would double-remove it and let the prefix regex match a same-named
|
|
37
|
+
// nested folder (e.g. pagesDir "app" turning "app/docs/app" into "/").
|
|
38
|
+
const pages = pagesGlob;
|
|
39
|
+
const layouts = layoutsGlob;
|
|
40
|
+
const notFounds = notFoundsGlob;
|
|
41
|
+
|
|
42
|
+
export function generateRoutes() {
|
|
43
|
+
const tree = buildRouteTree(pages, layouts, notFounds, ${JSON.stringify(r)});
|
|
44
|
+
const routes = treeToRoutes(tree, true);
|
|
45
|
+
return routes;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function Router() {
|
|
49
|
+
routes ??= generateRoutes();
|
|
50
|
+
return useRoutes(routes);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
let routes;
|
|
54
|
+
|
|
55
|
+
if (import.meta.hot) {
|
|
56
|
+
import.meta.hot.accept(() => {
|
|
57
|
+
routes = undefined;
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export { Link, useRoutes };
|
|
62
|
+
export { useParams };
|
|
63
|
+
`}}}}exports.nextViteRouter=O;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Plugin as Plugin_2 } from 'vite';
|
|
2
|
+
|
|
3
|
+
export declare function nextViteRouter(options?: NextViteRouterPluginOptions): Plugin_2;
|
|
4
|
+
|
|
5
|
+
export declare type NextViteRouterPluginOptions = {
|
|
6
|
+
pagesDir?: string;
|
|
7
|
+
pageFile?: string;
|
|
8
|
+
layoutFile?: string;
|
|
9
|
+
notFoundFile?: string;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export { }
|