@react-router/dev 7.16.0 → 8.0.0-pre.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/CHANGELOG.md +0 -2
- package/bin.cjs +20 -0
- package/dist/build-DM91F_L-.js +41 -0
- package/dist/cli/index.d.ts +2 -1
- package/dist/cli/index.js +378 -2638
- package/dist/config-DvmRcD4Z.d.ts +279 -0
- package/dist/config.d.ts +2 -280
- package/dist/config.js +2 -19
- package/dist/dev-CNEgIjT-.js +53 -0
- package/dist/routes-DXogguGb.js +194 -0
- package/dist/{routes-CZR-bKRt.d.ts → routes-Kx8VZRs3.d.ts} +63 -62
- package/dist/routes.d.ts +3 -2
- package/dist/routes.js +3 -190
- package/dist/typegen-BLMwBSoM.js +859 -0
- package/dist/vite.d.ts +7 -6
- package/dist/vite.js +3225 -6539
- package/module-sync-enabled/index.mjs +2 -2
- package/package.json +53 -59
- package/bin.js +0 -15
- package/dist/vite/cloudflare.d.ts +0 -24
- package/dist/vite/cloudflare.js +0 -938
package/CHANGELOG.md
CHANGED
|
@@ -5,11 +5,9 @@
|
|
|
5
5
|
### Minor Changes
|
|
6
6
|
|
|
7
7
|
- Stabilize `future.unstable_trailingSlashAwareDataRequests` as `future.v8_trailingSlashAwareDataRequests` ([#15098](https://github.com/remix-run/react-router/pull/15098))
|
|
8
|
-
|
|
9
8
|
- The unstable flag is no longer supported and will error during config resolution
|
|
10
9
|
|
|
11
10
|
- Log future flag warnings for upcoming React Router v8 flags ([#15029](https://github.com/remix-run/react-router/pull/15029))
|
|
12
|
-
|
|
13
11
|
- `v8_middleware`, `v8_splitRouteModules`, `v8_viteEnvironmentApi`, `v8_passThroughRequests`, `v8_trailingSlashAwareDataRequests`
|
|
14
12
|
|
|
15
13
|
### Patch Changes
|
package/bin.cjs
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
void (async () => {
|
|
3
|
+
let { default: arg } = await import("arg");
|
|
4
|
+
|
|
5
|
+
// Minimal replication of our actual parsing in `run.ts`. If not already set,
|
|
6
|
+
// default `NODE_ENV` so React loads the proper version in its CJS entry script.
|
|
7
|
+
// We have to do this before importing `run.ts` since that is what imports
|
|
8
|
+
// `react` (indirectly via `react-router`)
|
|
9
|
+
let args = arg({}, { argv: process.argv.slice(2), permissive: true });
|
|
10
|
+
if (args._.length === 0 || args._[0] === "dev") {
|
|
11
|
+
process.env.NODE_ENV = process.env.NODE_ENV ?? "development";
|
|
12
|
+
} else {
|
|
13
|
+
process.env.NODE_ENV = process.env.NODE_ENV ?? "production";
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
await import("./dist/cli/index.js");
|
|
17
|
+
})().catch((error) => {
|
|
18
|
+
if (error) console.error(error);
|
|
19
|
+
process.exit(1);
|
|
20
|
+
});
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @react-router/dev v8.0.0-pre.0
|
|
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 { g as preloadVite, h as getVite } from "./typegen-BLMwBSoM.js";
|
|
12
|
+
//#region vite/build.ts
|
|
13
|
+
async function build(root, viteBuildOptions) {
|
|
14
|
+
await preloadVite();
|
|
15
|
+
let { assetsInlineLimit, clearScreen, config: configFile, emptyOutDir, force, logLevel, minify, mode, sourcemapClient, sourcemapServer } = viteBuildOptions;
|
|
16
|
+
await (await getVite().createBuilder({
|
|
17
|
+
root,
|
|
18
|
+
mode,
|
|
19
|
+
configFile,
|
|
20
|
+
build: {
|
|
21
|
+
assetsInlineLimit,
|
|
22
|
+
emptyOutDir,
|
|
23
|
+
minify
|
|
24
|
+
},
|
|
25
|
+
optimizeDeps: { force },
|
|
26
|
+
clearScreen,
|
|
27
|
+
logLevel,
|
|
28
|
+
plugins: [{
|
|
29
|
+
name: "react-router:cli-config",
|
|
30
|
+
configEnvironment(name) {
|
|
31
|
+
if (sourcemapClient && name === "client") return { build: { sourcemap: sourcemapClient } };
|
|
32
|
+
if (sourcemapServer && name !== "client") return { build: { sourcemap: sourcemapServer } };
|
|
33
|
+
},
|
|
34
|
+
configResolved(config) {
|
|
35
|
+
if (!config.plugins.find((plugin) => plugin.name === "react-router" || plugin.name === "react-router/rsc")) throw new Error("React Router Vite plugin not found in Vite config");
|
|
36
|
+
}
|
|
37
|
+
}]
|
|
38
|
+
})).buildApp();
|
|
39
|
+
}
|
|
40
|
+
//#endregion
|
|
41
|
+
export { build };
|
package/dist/cli/index.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
export { };
|