@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 CHANGED
@@ -1,5 +1,22 @@
1
1
  # `@react-router/dev`
2
2
 
3
+ ## v7.15.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Fix `basename` conflicting with `app` directory name when Vite `base` is set ([#15027](https://github.com/remix-run/react-router/pull/15027))
8
+
9
+ When the Vite `base` config and React Router `basename` both match the
10
+ app directory name (e.g. `base: "/app/"`, `basename: "/app/"`), Vite would
11
+ strip the base prefix from server-build virtual module import paths, causing
12
+ "Failed to load url /root.tsx" errors. The fix uses `/@fs/` absolute paths
13
+ for those imports to bypass Vite's base-stripping logic.
14
+
15
+ - Updated dependencies:
16
+ - [`react-router@7.15.1`](https://github.com/remix-run/react-router/releases/tag/react-router@7.15.1)
17
+ - [`@react-router/node@7.15.1`](https://github.com/remix-run/react-router/releases/tag/@react-router/node@7.15.1)
18
+ - [`@react-router/serve@7.15.1`](https://github.com/remix-run/react-router/releases/tag/@react-router/serve@7.15.1)
19
+
3
20
  ## v7.15.0
4
21
 
5
22
  ### Minor 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 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 { i as preloadVite, r as getVite } from "./vite-oFg2Sopv.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 };
@@ -1 +1,2 @@
1
- #!/usr/bin/env node
1
+
2
+ export { };