@rsc-kit/core 0.29.6 → 0.29.8

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/vite.js CHANGED
@@ -351,7 +351,11 @@ function aliasEntries() {
351
351
  function resolvePaths(options) {
352
352
  projectRoot = resolve(options.projectRoot || process.env.RSC_PROJECT_ROOT || process.cwd());
353
353
  sourceDir = resolve(options.sourceDir || process.env.RSC_SOURCE_DIR || join(projectRoot, "src"));
354
- outDir = resolve(options.outDir || process.env.RSC_OUT_DIR || join(projectRoot, ".rsc"));
354
+ outDir = resolve(
355
+ // .rsc-kit/: the one folder rsc-kit generates into - the types beside
356
+ // the route table, the build report and the server entries - rather
357
+ // than a second one beside it.
358
+ options.outDir || process.env.RSC_OUT_DIR || join(projectRoot, ".rsc-kit"));
355
359
  appDir = join(sourceDir, "app");
356
360
  // Generated entries live under the (in-project) out dir so module resolution
357
361
  // can walk up to the project's node_modules (@vitejs/plugin-rsc, react, ...).
@@ -6746,7 +6750,14 @@ export function rscKit(options = {}) {
6746
6750
  return [
6747
6751
  join(projectRoot, HOST_FILE),
6748
6752
  join(sourceDir, HOST_ACTIONS_MODULE),
6749
- ...(existsSync(typesDir) ? readdirSync(typesDir).map((name) => join(typesDir, name)) : []),
6753
+ // The type declarations only: the folder also holds the build's
6754
+ // own output - the route table, its report, the server entries -
6755
+ // which nobody commits and --check has no business comparing.
6756
+ ...(existsSync(typesDir)
6757
+ ? readdirSync(typesDir)
6758
+ .filter((name) => name.endsWith(".d.ts"))
6759
+ .map((name) => join(typesDir, name))
6760
+ : []),
6750
6761
  ];
6751
6762
  },
6752
6763
  },