@c0va23/react-router-dev 7.8.3-alpha.1
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/CHANGELOG.md +2512 -0
- package/LICENSE.md +23 -0
- package/README.md +5 -0
- package/bin.js +15 -0
- package/dist/cli/index.d.ts +1 -0
- package/dist/cli/index.js +2521 -0
- package/dist/config/default-rsc-entries/entry.client.tsx +46 -0
- package/dist/config/default-rsc-entries/entry.rsc.tsx +42 -0
- package/dist/config/default-rsc-entries/entry.ssr.tsx +35 -0
- package/dist/config/defaults/entry.client.tsx +12 -0
- package/dist/config/defaults/entry.server.node.tsx +80 -0
- package/dist/config.d.ts +211 -0
- package/dist/config.js +28 -0
- package/dist/internal.d.ts +9 -0
- package/dist/internal.js +2216 -0
- package/dist/routes-CZR-bKRt.d.ts +123 -0
- package/dist/routes.d.ts +2 -0
- package/dist/routes.js +199 -0
- package/dist/static/refresh-utils.mjs +170 -0
- package/dist/static/rsc-refresh-utils.mjs +126 -0
- package/dist/vite/cloudflare.d.ts +24 -0
- package/dist/vite/cloudflare.js +900 -0
- package/dist/vite.d.ts +11 -0
- package/dist/vite.js +4914 -0
- package/module-sync-enabled/false.cjs +1 -0
- package/module-sync-enabled/index.d.mts +2 -0
- package/module-sync-enabled/index.mjs +4 -0
- package/module-sync-enabled/true.mjs +2 -0
- package/package.json +157 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import "virtual:react-router/unstable_rsc/inject-hmr-runtime";
|
|
2
|
+
|
|
3
|
+
import { startTransition, StrictMode } from "react";
|
|
4
|
+
import { hydrateRoot } from "react-dom/client";
|
|
5
|
+
import {
|
|
6
|
+
createFromReadableStream,
|
|
7
|
+
createTemporaryReferenceSet,
|
|
8
|
+
encodeReply,
|
|
9
|
+
setServerCallback,
|
|
10
|
+
} from "@vitejs/plugin-rsc/browser";
|
|
11
|
+
import {
|
|
12
|
+
unstable_createCallServer as createCallServer,
|
|
13
|
+
unstable_getRSCStream as getRSCStream,
|
|
14
|
+
unstable_RSCHydratedRouter as RSCHydratedRouter,
|
|
15
|
+
} from "react-router";
|
|
16
|
+
import type { unstable_RSCPayload as RSCPayload } from "react-router";
|
|
17
|
+
|
|
18
|
+
setServerCallback(
|
|
19
|
+
createCallServer({
|
|
20
|
+
createFromReadableStream,
|
|
21
|
+
createTemporaryReferenceSet,
|
|
22
|
+
encodeReply,
|
|
23
|
+
}),
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
createFromReadableStream<RSCPayload>(getRSCStream()).then((payload) => {
|
|
27
|
+
// @ts-expect-error - on 18 types, requires 19.
|
|
28
|
+
startTransition(async () => {
|
|
29
|
+
const formState =
|
|
30
|
+
payload.type === "render" ? await payload.formState : undefined;
|
|
31
|
+
|
|
32
|
+
hydrateRoot(
|
|
33
|
+
document,
|
|
34
|
+
<StrictMode>
|
|
35
|
+
<RSCHydratedRouter
|
|
36
|
+
payload={payload}
|
|
37
|
+
createFromReadableStream={createFromReadableStream}
|
|
38
|
+
/>
|
|
39
|
+
</StrictMode>,
|
|
40
|
+
{
|
|
41
|
+
// @ts-expect-error - no types for this yet
|
|
42
|
+
formState,
|
|
43
|
+
},
|
|
44
|
+
);
|
|
45
|
+
});
|
|
46
|
+
});
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createTemporaryReferenceSet,
|
|
3
|
+
decodeAction,
|
|
4
|
+
decodeFormState,
|
|
5
|
+
decodeReply,
|
|
6
|
+
loadServerAction,
|
|
7
|
+
renderToReadableStream,
|
|
8
|
+
} from "@vitejs/plugin-rsc/rsc";
|
|
9
|
+
import { unstable_matchRSCServerRequest as matchRSCServerRequest } from "react-router";
|
|
10
|
+
|
|
11
|
+
import routes from "virtual:react-router/unstable_rsc/routes";
|
|
12
|
+
import basename from "virtual:react-router/unstable_rsc/basename";
|
|
13
|
+
|
|
14
|
+
export async function fetchServer(request: Request) {
|
|
15
|
+
return await matchRSCServerRequest({
|
|
16
|
+
createTemporaryReferenceSet,
|
|
17
|
+
decodeAction,
|
|
18
|
+
decodeFormState,
|
|
19
|
+
decodeReply,
|
|
20
|
+
loadServerAction,
|
|
21
|
+
request,
|
|
22
|
+
routes,
|
|
23
|
+
basename,
|
|
24
|
+
generateResponse(match, options) {
|
|
25
|
+
return new Response(renderToReadableStream(match.payload, options), {
|
|
26
|
+
status: match.statusCode,
|
|
27
|
+
headers: match.headers,
|
|
28
|
+
});
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export default async function handler(request: Request) {
|
|
34
|
+
const ssr = await import.meta.viteRsc.loadModule<
|
|
35
|
+
typeof import("./entry.ssr")
|
|
36
|
+
>("ssr", "index");
|
|
37
|
+
return ssr.default(request, fetchServer);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
if (import.meta.hot) {
|
|
41
|
+
import.meta.hot.accept();
|
|
42
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { createFromReadableStream } from "@vitejs/plugin-rsc/ssr";
|
|
2
|
+
// @ts-expect-error
|
|
3
|
+
import * as ReactDomServer from "react-dom/server.edge";
|
|
4
|
+
import {
|
|
5
|
+
unstable_RSCStaticRouter as RSCStaticRouter,
|
|
6
|
+
unstable_routeRSCServerRequest as routeRSCServerRequest,
|
|
7
|
+
} from "react-router";
|
|
8
|
+
|
|
9
|
+
export default async function handler(
|
|
10
|
+
request: Request,
|
|
11
|
+
fetchServer: (request: Request) => Promise<Response>,
|
|
12
|
+
) {
|
|
13
|
+
const bootstrapScriptContent =
|
|
14
|
+
await import.meta.viteRsc.loadBootstrapScriptContent("index");
|
|
15
|
+
|
|
16
|
+
return routeRSCServerRequest({
|
|
17
|
+
request,
|
|
18
|
+
fetchServer,
|
|
19
|
+
createFromReadableStream,
|
|
20
|
+
async renderHTML(getPayload) {
|
|
21
|
+
const payload = await getPayload();
|
|
22
|
+
const formState =
|
|
23
|
+
payload.type === "render" ? await payload.formState : undefined;
|
|
24
|
+
|
|
25
|
+
return ReactDomServer.renderToReadableStream(
|
|
26
|
+
<RSCStaticRouter getPayload={getPayload} />,
|
|
27
|
+
{
|
|
28
|
+
bootstrapScriptContent,
|
|
29
|
+
signal: request.signal,
|
|
30
|
+
formState,
|
|
31
|
+
},
|
|
32
|
+
);
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { startTransition, StrictMode } from "react";
|
|
2
|
+
import { hydrateRoot } from "react-dom/client";
|
|
3
|
+
import { HydratedRouter } from "react-router/dom";
|
|
4
|
+
|
|
5
|
+
startTransition(() => {
|
|
6
|
+
hydrateRoot(
|
|
7
|
+
document,
|
|
8
|
+
<StrictMode>
|
|
9
|
+
<HydratedRouter />
|
|
10
|
+
</StrictMode>,
|
|
11
|
+
);
|
|
12
|
+
});
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { PassThrough } from "node:stream";
|
|
2
|
+
|
|
3
|
+
import type { AppLoadContext, EntryContext } from "react-router";
|
|
4
|
+
import { createReadableStreamFromReadable } from "@react-router/node";
|
|
5
|
+
import { ServerRouter } from "react-router";
|
|
6
|
+
import { isbot } from "isbot";
|
|
7
|
+
import type { RenderToPipeableStreamOptions } from "react-dom/server";
|
|
8
|
+
import { renderToPipeableStream } from "react-dom/server";
|
|
9
|
+
|
|
10
|
+
export const streamTimeout = 5_000;
|
|
11
|
+
|
|
12
|
+
export default function handleRequest(
|
|
13
|
+
request: Request,
|
|
14
|
+
responseStatusCode: number,
|
|
15
|
+
responseHeaders: Headers,
|
|
16
|
+
routerContext: EntryContext,
|
|
17
|
+
loadContext: AppLoadContext,
|
|
18
|
+
// If you have middleware enabled:
|
|
19
|
+
// loadContext: RouterContextProvider
|
|
20
|
+
) {
|
|
21
|
+
return new Promise((resolve, reject) => {
|
|
22
|
+
let shellRendered = false;
|
|
23
|
+
let userAgent = request.headers.get("user-agent");
|
|
24
|
+
|
|
25
|
+
// Ensure requests from bots and SPA Mode renders wait for all content to load before responding
|
|
26
|
+
// https://react.dev/reference/react-dom/server/renderToPipeableStream#waiting-for-all-content-to-load-for-crawlers-and-static-generation
|
|
27
|
+
let readyOption: keyof RenderToPipeableStreamOptions =
|
|
28
|
+
(userAgent && isbot(userAgent)) || routerContext.isSpaMode
|
|
29
|
+
? "onAllReady"
|
|
30
|
+
: "onShellReady";
|
|
31
|
+
|
|
32
|
+
// Abort the rendering stream after the `streamTimeout` so it has time to
|
|
33
|
+
// flush down the rejected boundaries
|
|
34
|
+
let timeoutId: ReturnType<typeof setTimeout> | undefined = setTimeout(
|
|
35
|
+
() => abort(),
|
|
36
|
+
streamTimeout + 1000,
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
const { pipe, abort } = renderToPipeableStream(
|
|
40
|
+
<ServerRouter context={routerContext} url={request.url} />,
|
|
41
|
+
{
|
|
42
|
+
[readyOption]() {
|
|
43
|
+
shellRendered = true;
|
|
44
|
+
const body = new PassThrough({
|
|
45
|
+
final(callback) {
|
|
46
|
+
// Clear the timeout to prevent retaining the closure and memory leak
|
|
47
|
+
clearTimeout(timeoutId);
|
|
48
|
+
timeoutId = undefined;
|
|
49
|
+
callback();
|
|
50
|
+
},
|
|
51
|
+
});
|
|
52
|
+
const stream = createReadableStreamFromReadable(body);
|
|
53
|
+
|
|
54
|
+
responseHeaders.set("Content-Type", "text/html");
|
|
55
|
+
|
|
56
|
+
pipe(body);
|
|
57
|
+
|
|
58
|
+
resolve(
|
|
59
|
+
new Response(stream, {
|
|
60
|
+
headers: responseHeaders,
|
|
61
|
+
status: responseStatusCode,
|
|
62
|
+
}),
|
|
63
|
+
);
|
|
64
|
+
},
|
|
65
|
+
onShellError(error: unknown) {
|
|
66
|
+
reject(error);
|
|
67
|
+
},
|
|
68
|
+
onError(error: unknown) {
|
|
69
|
+
responseStatusCode = 500;
|
|
70
|
+
// Log streaming rendering errors from inside the shell. Don't log
|
|
71
|
+
// errors encountered during initial shell rendering since they'll
|
|
72
|
+
// reject and get logged in handleDocumentRequest.
|
|
73
|
+
if (shellRendered) {
|
|
74
|
+
console.error(error);
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
);
|
|
79
|
+
});
|
|
80
|
+
}
|
package/dist/config.d.ts
ADDED
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import * as Vite from 'vite';
|
|
2
|
+
import { R as RouteManifest, a as RouteManifestEntry, b as RouteConfigEntry } from './routes-CZR-bKRt.js';
|
|
3
|
+
import 'valibot';
|
|
4
|
+
|
|
5
|
+
declare const excludedConfigPresetKeys: readonly ["presets"];
|
|
6
|
+
type ExcludedConfigPresetKey = (typeof excludedConfigPresetKeys)[number];
|
|
7
|
+
type ConfigPreset = Omit<ReactRouterConfig, ExcludedConfigPresetKey>;
|
|
8
|
+
type Preset = {
|
|
9
|
+
name: string;
|
|
10
|
+
reactRouterConfig?: (args: {
|
|
11
|
+
reactRouterUserConfig: ReactRouterConfig;
|
|
12
|
+
}) => ConfigPreset | Promise<ConfigPreset>;
|
|
13
|
+
reactRouterConfigResolved?: (args: {
|
|
14
|
+
reactRouterConfig: ResolvedReactRouterConfig;
|
|
15
|
+
}) => void | Promise<void>;
|
|
16
|
+
};
|
|
17
|
+
declare const branchRouteProperties: readonly ["id", "path", "file", "index"];
|
|
18
|
+
type BranchRoute = Pick<RouteManifestEntry, (typeof branchRouteProperties)[number]>;
|
|
19
|
+
type ServerBundlesFunction = (args: {
|
|
20
|
+
branch: BranchRoute[];
|
|
21
|
+
}) => string | Promise<string>;
|
|
22
|
+
type BaseBuildManifest = {
|
|
23
|
+
routes: RouteManifest;
|
|
24
|
+
};
|
|
25
|
+
type DefaultBuildManifest = BaseBuildManifest & {
|
|
26
|
+
serverBundles?: never;
|
|
27
|
+
routeIdToServerBundleId?: never;
|
|
28
|
+
};
|
|
29
|
+
type ServerBundlesBuildManifest = BaseBuildManifest & {
|
|
30
|
+
serverBundles: {
|
|
31
|
+
[serverBundleId: string]: {
|
|
32
|
+
id: string;
|
|
33
|
+
file: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
routeIdToServerBundleId: Record<string, string>;
|
|
37
|
+
};
|
|
38
|
+
type ServerModuleFormat = "esm" | "cjs";
|
|
39
|
+
interface FutureConfig {
|
|
40
|
+
/**
|
|
41
|
+
* Enable route middleware
|
|
42
|
+
*/
|
|
43
|
+
v8_middleware: boolean;
|
|
44
|
+
unstable_optimizeDeps: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Automatically split route modules into multiple chunks when possible.
|
|
47
|
+
*/
|
|
48
|
+
unstable_splitRouteModules: boolean | "enforce";
|
|
49
|
+
unstable_subResourceIntegrity: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Use Vite Environment API (experimental)
|
|
52
|
+
*/
|
|
53
|
+
unstable_viteEnvironmentApi: boolean;
|
|
54
|
+
}
|
|
55
|
+
type BuildManifest = DefaultBuildManifest | ServerBundlesBuildManifest;
|
|
56
|
+
type BuildEndHook = (args: {
|
|
57
|
+
buildManifest: BuildManifest | undefined;
|
|
58
|
+
reactRouterConfig: ResolvedReactRouterConfig;
|
|
59
|
+
viteConfig: Vite.ResolvedConfig;
|
|
60
|
+
}) => void | Promise<void>;
|
|
61
|
+
/**
|
|
62
|
+
* Config to be exported via the default export from `react-router.config.ts`.
|
|
63
|
+
*/
|
|
64
|
+
type ReactRouterConfig = {
|
|
65
|
+
/**
|
|
66
|
+
* The path to the `app` directory, relative to the root directory. Defaults
|
|
67
|
+
* to `"app"`.
|
|
68
|
+
*/
|
|
69
|
+
appDirectory?: string;
|
|
70
|
+
/**
|
|
71
|
+
* The output format of the server build. Defaults to "esm".
|
|
72
|
+
*/
|
|
73
|
+
serverModuleFormat?: ServerModuleFormat;
|
|
74
|
+
/**
|
|
75
|
+
* Enabled future flags
|
|
76
|
+
*/
|
|
77
|
+
future?: [keyof FutureConfig] extends [never] ? {
|
|
78
|
+
[key: string]: never;
|
|
79
|
+
} : Partial<FutureConfig>;
|
|
80
|
+
/**
|
|
81
|
+
* The React Router app basename. Defaults to `"/"`.
|
|
82
|
+
*/
|
|
83
|
+
basename?: string;
|
|
84
|
+
/**
|
|
85
|
+
* The path to the build directory, relative to the project. Defaults to
|
|
86
|
+
* `"build"`.
|
|
87
|
+
*/
|
|
88
|
+
buildDirectory?: string;
|
|
89
|
+
/**
|
|
90
|
+
* A function that is called after the full React Router build is complete.
|
|
91
|
+
*/
|
|
92
|
+
buildEnd?: BuildEndHook;
|
|
93
|
+
/**
|
|
94
|
+
* An array of URLs to prerender to HTML files at build time. Can also be a
|
|
95
|
+
* function returning an array to dynamically generate URLs.
|
|
96
|
+
*/
|
|
97
|
+
prerender?: boolean | Array<string> | ((args: {
|
|
98
|
+
getStaticPaths: () => string[];
|
|
99
|
+
}) => Array<string> | Promise<Array<string>>);
|
|
100
|
+
/**
|
|
101
|
+
* An array of React Router plugin config presets to ease integration with
|
|
102
|
+
* other platforms and tools.
|
|
103
|
+
*/
|
|
104
|
+
presets?: Array<Preset>;
|
|
105
|
+
/**
|
|
106
|
+
* Control the "Lazy Route Discovery" behavior
|
|
107
|
+
*
|
|
108
|
+
* - `routeDiscovery.mode`: By default, this resolves to `lazy` which will
|
|
109
|
+
* lazily discover routes as the user navigates around your application.
|
|
110
|
+
* You can set this to `initial` to opt-out of this behavior and load all
|
|
111
|
+
* routes with the initial HTML document load.
|
|
112
|
+
* - `routeDiscovery.manifestPath`: The path to serve the manifest file from.
|
|
113
|
+
* Only applies to `mode: "lazy"` and defaults to `/__manifest`.
|
|
114
|
+
*/
|
|
115
|
+
routeDiscovery?: {
|
|
116
|
+
mode: "lazy";
|
|
117
|
+
manifestPath?: string;
|
|
118
|
+
} | {
|
|
119
|
+
mode: "initial";
|
|
120
|
+
};
|
|
121
|
+
/**
|
|
122
|
+
* The file name of the server build output. This file
|
|
123
|
+
* should end in a `.js` extension and should be deployed to your server.
|
|
124
|
+
* Defaults to `"index.js"`.
|
|
125
|
+
*/
|
|
126
|
+
serverBuildFile?: string;
|
|
127
|
+
/**
|
|
128
|
+
* A function for assigning routes to different server bundles. This
|
|
129
|
+
* function should return a server bundle ID which will be used as the
|
|
130
|
+
* bundle's directory name within the server build directory.
|
|
131
|
+
*/
|
|
132
|
+
serverBundles?: ServerBundlesFunction;
|
|
133
|
+
/**
|
|
134
|
+
* Enable server-side rendering for your application. Disable to use "SPA
|
|
135
|
+
* Mode", which will request the `/` path at build-time and save it as an
|
|
136
|
+
* `index.html` file with your assets so your application can be deployed as a
|
|
137
|
+
* SPA without server-rendering. Default's to `true`.
|
|
138
|
+
*/
|
|
139
|
+
ssr?: boolean;
|
|
140
|
+
};
|
|
141
|
+
type ResolvedReactRouterConfig = Readonly<{
|
|
142
|
+
/**
|
|
143
|
+
* The absolute path to the application source directory.
|
|
144
|
+
*/
|
|
145
|
+
appDirectory: string;
|
|
146
|
+
/**
|
|
147
|
+
* The React Router app basename. Defaults to `"/"`.
|
|
148
|
+
*/
|
|
149
|
+
basename: string;
|
|
150
|
+
/**
|
|
151
|
+
* The absolute path to the build directory.
|
|
152
|
+
*/
|
|
153
|
+
buildDirectory: string;
|
|
154
|
+
/**
|
|
155
|
+
* A function that is called after the full React Router build is complete.
|
|
156
|
+
*/
|
|
157
|
+
buildEnd?: BuildEndHook;
|
|
158
|
+
/**
|
|
159
|
+
* Enabled future flags
|
|
160
|
+
*/
|
|
161
|
+
future: FutureConfig;
|
|
162
|
+
/**
|
|
163
|
+
* An array of URLs to prerender to HTML files at build time. Can also be a
|
|
164
|
+
* function returning an array to dynamically generate URLs.
|
|
165
|
+
*/
|
|
166
|
+
prerender: ReactRouterConfig["prerender"];
|
|
167
|
+
/**
|
|
168
|
+
* Control the "Lazy Route Discovery" behavior
|
|
169
|
+
*
|
|
170
|
+
* - `routeDiscovery.mode`: By default, this resolves to `lazy` which will
|
|
171
|
+
* lazily discover routes as the user navigates around your application.
|
|
172
|
+
* You can set this to `initial` to opt-out of this behavior and load all
|
|
173
|
+
* routes with the initial HTML document load.
|
|
174
|
+
* - `routeDiscovery.manifestPath`: The path to serve the manifest file from.
|
|
175
|
+
* Only applies to `mode: "lazy"` and defaults to `/__manifest`.
|
|
176
|
+
*/
|
|
177
|
+
routeDiscovery: ReactRouterConfig["routeDiscovery"];
|
|
178
|
+
/**
|
|
179
|
+
* An object of all available routes, keyed by route id.
|
|
180
|
+
*/
|
|
181
|
+
routes: RouteManifest;
|
|
182
|
+
/**
|
|
183
|
+
* The file name of the server build output. This file
|
|
184
|
+
* should end in a `.js` extension and should be deployed to your server.
|
|
185
|
+
* Defaults to `"index.js"`.
|
|
186
|
+
*/
|
|
187
|
+
serverBuildFile: string;
|
|
188
|
+
/**
|
|
189
|
+
* A function for assigning routes to different server bundles. This
|
|
190
|
+
* function should return a server bundle ID which will be used as the
|
|
191
|
+
* bundle's directory name within the server build directory.
|
|
192
|
+
*/
|
|
193
|
+
serverBundles?: ServerBundlesFunction;
|
|
194
|
+
/**
|
|
195
|
+
* The output format of the server build. Defaults to "esm".
|
|
196
|
+
*/
|
|
197
|
+
serverModuleFormat: ServerModuleFormat;
|
|
198
|
+
/**
|
|
199
|
+
* Enable server-side rendering for your application. Disable to use "SPA
|
|
200
|
+
* Mode", which will request the `/` path at build-time and save it as an
|
|
201
|
+
* `index.html` file with your assets so your application can be deployed as a
|
|
202
|
+
* SPA without server-rendering. Default's to `true`.
|
|
203
|
+
*/
|
|
204
|
+
ssr: boolean;
|
|
205
|
+
/**
|
|
206
|
+
* The resolved array of route config entries exported from `routes.ts`
|
|
207
|
+
*/
|
|
208
|
+
unstable_routeConfig: RouteConfigEntry[];
|
|
209
|
+
}>;
|
|
210
|
+
|
|
211
|
+
export type { BuildManifest, ReactRouterConfig as Config, Preset, ServerBundlesFunction };
|
package/dist/config.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @c0va23/react-router-dev v7.8.3-alpha.1
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) Remix Software Inc.
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the MIT license found in the
|
|
7
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
8
|
+
*
|
|
9
|
+
* @license MIT
|
|
10
|
+
*/
|
|
11
|
+
"use strict";
|
|
12
|
+
var __defProp = Object.defineProperty;
|
|
13
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
14
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
15
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
16
|
+
var __copyProps = (to, from, except, desc) => {
|
|
17
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
18
|
+
for (let key of __getOwnPropNames(from))
|
|
19
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
20
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
21
|
+
}
|
|
22
|
+
return to;
|
|
23
|
+
};
|
|
24
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
25
|
+
|
|
26
|
+
// config.ts
|
|
27
|
+
var config_exports = {};
|
|
28
|
+
module.exports = __toCommonJS(config_exports);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as Vite from 'vite';
|
|
2
|
+
|
|
3
|
+
declare function reactRouterRSCVitePlugin(): Vite.PluginOption[];
|
|
4
|
+
|
|
5
|
+
declare const __INTERNAL_DO_NOT_USE_OR_YOU_WILL_GET_A_STRONGLY_WORDED_LETTER__: {
|
|
6
|
+
unstable_reactRouterRSC: typeof reactRouterRSCVitePlugin;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export { __INTERNAL_DO_NOT_USE_OR_YOU_WILL_GET_A_STRONGLY_WORDED_LETTER__ };
|