@react-router/dev 0.0.0-experimental-073f56f6c → 0.0.0-experimental-ce4015162
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 +17 -0
- package/bin.cjs +20 -0
- package/dist/build-BzQqIPQx.js +41 -0
- package/dist/cli/index.d.ts +2 -1
- package/dist/cli/index.js +379 -2591
- package/dist/config-DOhNF86o.d.ts +280 -0
- package/dist/config.d.ts +2 -280
- package/dist/config.js +2 -19
- package/dist/dev--vS8KUm0.js +53 -0
- package/dist/invariant-BCP1NPJ8.js +19 -0
- package/dist/{routes-CZR-bKRt.d.ts → routes-BbocpwgJ.d.ts} +63 -62
- package/dist/routes-DWLkrlkM.js +187 -0
- package/dist/routes.d.ts +3 -2
- package/dist/routes.js +3 -190
- package/dist/typegen-DfdqqoXA.js +841 -0
- package/dist/vite-oFg2Sopv.js +41 -0
- package/dist/vite.d.ts +7 -6
- package/dist/vite.js +3180 -6488
- package/module-sync-enabled/index.mjs +2 -2
- package/package.json +46 -49
- package/bin.js +0 -15
- package/dist/vite/cloudflare.d.ts +0 -24
- package/dist/vite/cloudflare.js +0 -891
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @react-router/dev v0.0.0-experimental-ce4015162
|
|
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
|
+
import { t as invariant } from "./invariant-BCP1NPJ8.js";
|
|
12
|
+
import { createRequire } from "node:module";
|
|
13
|
+
import path from "pathe";
|
|
14
|
+
//#region config/is-react-router-repo.ts
|
|
15
|
+
const nodeRequire$1 = createRequire(import.meta.url);
|
|
16
|
+
function isReactRouterRepo() {
|
|
17
|
+
let serverRuntimePath = path.dirname(nodeRequire$1.resolve("@react-router/node/package.json"));
|
|
18
|
+
return path.basename(path.resolve(serverRuntimePath, "..")) === "packages";
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region vite/vite.ts
|
|
22
|
+
const nodeRequire = createRequire(import.meta.url);
|
|
23
|
+
let vite;
|
|
24
|
+
const viteImportSpecifier = isReactRouterRepo() ? `file:///${path.normalize(nodeRequire.resolve("vite/package.json", { paths: [process.cwd()] })).replace("package.json", "dist/node/index.js")}` : "vite";
|
|
25
|
+
async function preloadVite() {
|
|
26
|
+
vite = await import(viteImportSpecifier);
|
|
27
|
+
}
|
|
28
|
+
function getVite() {
|
|
29
|
+
invariant(vite, "getVite() called before preloadVite()");
|
|
30
|
+
return vite;
|
|
31
|
+
}
|
|
32
|
+
function defineCompilerOptions(options) {
|
|
33
|
+
let vite = getVite();
|
|
34
|
+
return parseInt(vite.version.split(".")[0], 10) >= 8 ? { oxc: options.oxc } : { esbuild: options.esbuild };
|
|
35
|
+
}
|
|
36
|
+
function defineOptimizeDepsCompilerOptions(options) {
|
|
37
|
+
let vite = getVite();
|
|
38
|
+
return parseInt(vite.version.split(".")[0], 10) >= 8 ? { rolldownOptions: options.rolldown } : { esbuildOptions: options.esbuild };
|
|
39
|
+
}
|
|
40
|
+
//#endregion
|
|
41
|
+
export { isReactRouterRepo as a, preloadVite as i, defineOptimizeDepsCompilerOptions as n, getVite as r, defineCompilerOptions as t };
|
package/dist/vite.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import * as Vite from 'vite';
|
|
2
|
-
import './routes-CZR-bKRt.js';
|
|
3
|
-
import 'valibot';
|
|
4
1
|
|
|
2
|
+
import * as Vite from "vite";
|
|
3
|
+
|
|
4
|
+
//#region vite/plugin.d.ts
|
|
5
5
|
type ReactRouterVitePlugin = () => Vite.Plugin[];
|
|
6
6
|
/**
|
|
7
7
|
* React Router [Vite plugin.](https://vitejs.dev/guide/using-plugins.html)
|
|
8
8
|
*/
|
|
9
9
|
declare const reactRouterVitePlugin: ReactRouterVitePlugin;
|
|
10
|
-
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region vite/rsc/plugin.d.ts
|
|
11
12
|
declare function reactRouterRSCVitePlugin(): Vite.PluginOption[];
|
|
12
|
-
|
|
13
|
-
export { reactRouterVitePlugin as reactRouter, reactRouterRSCVitePlugin as unstable_reactRouterRSC };
|
|
13
|
+
//#endregion
|
|
14
|
+
export { reactRouterVitePlugin as reactRouter, reactRouterRSCVitePlugin as unstable_reactRouterRSC };
|