@react-router/dev 0.0.0-experimental-df6bc686c → 0.0.0-experimental-9ea41ead4
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/cli/index.js +2 -3
- package/dist/config.d.ts +1 -1
- package/dist/config.js +1 -1
- package/dist/routes.js +1 -1
- package/dist/static/refresh-utils.cjs +0 -1
- package/dist/vite/cloudflare.js +1 -1
- package/dist/vite.js +11 -6
- package/package.json +6 -6
package/dist/cli/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* @react-router/dev v0.0.0-experimental-
|
|
3
|
+
* @react-router/dev v0.0.0-experimental-9ea41ead4
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) Remix Software Inc.
|
|
6
6
|
*
|
|
@@ -317,7 +317,6 @@ async function resolveConfig({
|
|
|
317
317
|
basename: basename2,
|
|
318
318
|
buildDirectory: userBuildDirectory,
|
|
319
319
|
buildEnd,
|
|
320
|
-
future: userFuture,
|
|
321
320
|
prerender,
|
|
322
321
|
serverBuildFile,
|
|
323
322
|
serverBundles,
|
|
@@ -391,7 +390,7 @@ async function resolveConfig({
|
|
|
391
390
|
}
|
|
392
391
|
let future = {
|
|
393
392
|
unstable_optimizeDeps: reactRouterUserConfig.future?.unstable_optimizeDeps ?? false,
|
|
394
|
-
unstable_splitRouteModules:
|
|
393
|
+
unstable_splitRouteModules: reactRouterUserConfig.future?.unstable_splitRouteModules ?? false
|
|
395
394
|
};
|
|
396
395
|
let reactRouterConfig = deepFreeze({
|
|
397
396
|
appDirectory,
|
package/dist/config.d.ts
CHANGED
|
@@ -133,7 +133,7 @@ type ResolvedReactRouterConfig = Readonly<{
|
|
|
133
133
|
/**
|
|
134
134
|
* Enabled future flags
|
|
135
135
|
*/
|
|
136
|
-
future:
|
|
136
|
+
future: FutureConfig;
|
|
137
137
|
/**
|
|
138
138
|
* An array of URLs to prerender to HTML files at build time. Can also be a
|
|
139
139
|
* function returning an array to dynamically generate URLs.
|
package/dist/config.js
CHANGED
package/dist/routes.js
CHANGED
package/dist/vite/cloudflare.js
CHANGED
package/dist/vite.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @react-router/dev v0.0.0-experimental-
|
|
2
|
+
* @react-router/dev v0.0.0-experimental-9ea41ead4
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -371,7 +371,6 @@ async function resolveConfig({
|
|
|
371
371
|
basename: basename2,
|
|
372
372
|
buildDirectory: userBuildDirectory,
|
|
373
373
|
buildEnd,
|
|
374
|
-
future: userFuture,
|
|
375
374
|
prerender,
|
|
376
375
|
serverBuildFile,
|
|
377
376
|
serverBundles,
|
|
@@ -445,7 +444,7 @@ async function resolveConfig({
|
|
|
445
444
|
}
|
|
446
445
|
let future = {
|
|
447
446
|
unstable_optimizeDeps: reactRouterUserConfig.future?.unstable_optimizeDeps ?? false,
|
|
448
|
-
unstable_splitRouteModules:
|
|
447
|
+
unstable_splitRouteModules: reactRouterUserConfig.future?.unstable_splitRouteModules ?? false
|
|
449
448
|
};
|
|
450
449
|
let reactRouterConfig = deepFreeze({
|
|
451
450
|
appDirectory,
|
|
@@ -2366,7 +2365,7 @@ var reactRouterVitePlugin = () => {
|
|
|
2366
2365
|
index: route.index,
|
|
2367
2366
|
caseSensitive: route.caseSensitive,
|
|
2368
2367
|
module: routeModulePath,
|
|
2369
|
-
//
|
|
2368
|
+
// Split route modules are a build-time optimization
|
|
2370
2369
|
clientActionModule: void 0,
|
|
2371
2370
|
clientLoaderModule: void 0,
|
|
2372
2371
|
hydrateFallbackModule: void 0,
|
|
@@ -2888,10 +2887,14 @@ var reactRouterVitePlugin = () => {
|
|
|
2888
2887
|
}
|
|
2889
2888
|
},
|
|
2890
2889
|
{
|
|
2891
|
-
name: "react-router:route-
|
|
2890
|
+
name: "react-router:split-route-modules",
|
|
2892
2891
|
async transform(code, id, options) {
|
|
2893
2892
|
if (options?.ssr) return;
|
|
2894
2893
|
if (!isRouteChunkModuleId(id)) return;
|
|
2894
|
+
invariant(
|
|
2895
|
+
viteCommand === "build",
|
|
2896
|
+
"Route modules are only split in build mode"
|
|
2897
|
+
);
|
|
2895
2898
|
let chunkName = getRouteChunkNameFromModuleId(id);
|
|
2896
2899
|
if (!chunkName) {
|
|
2897
2900
|
throw new Error(`Invalid route chunk name "${chunkName}" in "${id}"`);
|
|
@@ -2905,7 +2908,9 @@ var reactRouterVitePlugin = () => {
|
|
|
2905
2908
|
);
|
|
2906
2909
|
let preventEmptyChunkSnippet = ({ reason }) => `Math.random()<0&&console.log(${JSON.stringify(reason)});`;
|
|
2907
2910
|
if (chunk === null) {
|
|
2908
|
-
return preventEmptyChunkSnippet({
|
|
2911
|
+
return preventEmptyChunkSnippet({
|
|
2912
|
+
reason: "Split round modules disabled"
|
|
2913
|
+
});
|
|
2909
2914
|
}
|
|
2910
2915
|
let enforceSplitRouteModules = ctx.reactRouterConfig.future.unstable_splitRouteModules === "enforce";
|
|
2911
2916
|
if (enforceSplitRouteModules && chunkName === "main" && chunk) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-router/dev",
|
|
3
|
-
"version": "0.0.0-experimental-
|
|
3
|
+
"version": "0.0.0-experimental-9ea41ead4",
|
|
4
4
|
"description": "Dev tools and CLI for React Router",
|
|
5
5
|
"homepage": "https://reactrouter.com",
|
|
6
6
|
"bugs": {
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"set-cookie-parser": "^2.6.0",
|
|
89
89
|
"valibot": "^0.41.0",
|
|
90
90
|
"vite-node": "3.0.0-beta.2",
|
|
91
|
-
"@react-router/node": "0.0.0-experimental-
|
|
91
|
+
"@react-router/node": "0.0.0-experimental-9ea41ead4"
|
|
92
92
|
},
|
|
93
93
|
"devDependencies": {
|
|
94
94
|
"@types/babel__core": "^7.20.5",
|
|
@@ -117,15 +117,15 @@
|
|
|
117
117
|
"vite": "^6.0.0",
|
|
118
118
|
"wireit": "0.14.9",
|
|
119
119
|
"wrangler": "^3.28.2",
|
|
120
|
-
"@react-router/serve": "0.0.0-experimental-
|
|
121
|
-
"react-router": "^0.0.0-experimental-
|
|
120
|
+
"@react-router/serve": "0.0.0-experimental-9ea41ead4",
|
|
121
|
+
"react-router": "^0.0.0-experimental-9ea41ead4"
|
|
122
122
|
},
|
|
123
123
|
"peerDependencies": {
|
|
124
124
|
"typescript": "^5.1.0",
|
|
125
125
|
"vite": "^5.1.0 || ^6.0.0",
|
|
126
126
|
"wrangler": "^3.28.2",
|
|
127
|
-
"@react-router/serve": "^0.0.0-experimental-
|
|
128
|
-
"react-router": "^0.0.0-experimental-
|
|
127
|
+
"@react-router/serve": "^0.0.0-experimental-9ea41ead4",
|
|
128
|
+
"react-router": "^0.0.0-experimental-9ea41ead4"
|
|
129
129
|
},
|
|
130
130
|
"peerDependenciesMeta": {
|
|
131
131
|
"@react-router/serve": {
|