@pylonsync/sdk 0.11.5 → 0.11.6

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.ts +9 -1
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.11.5",
6
+ "version": "0.11.6",
7
7
  "type": "module",
8
8
  "main": "./src/index.ts",
9
9
  "types": "./dist/index.d.ts",
package/src/index.ts CHANGED
@@ -1166,11 +1166,19 @@ export async function discoverAppRoutes(opts?: {
1166
1166
 
1167
1167
  // Resolve the first existing `<base>.{tsx,ts,jsx,js}` in `dir` and
1168
1168
  // return it as a cwd-relative, extension-less module path (or null).
1169
+ // Component paths always use "/", on Windows too: they are manifest keys,
1170
+ // client-bundle import specifiers, and the input to the SSR runtime's
1171
+ // boundary walk, all of which split on "/".
1169
1172
  const findModule = (dir: string, base: string): string | null => {
1170
1173
  const hit = [`${base}.tsx`, `${base}.ts`, `${base}.jsx`, `${base}.js`]
1171
1174
  .map((n: string) => path.join(dir, n))
1172
1175
  .find((p: string) => fs.existsSync(p));
1173
- return hit ? path.relative(cwd, hit).replace(/\.(tsx?|jsx?)$/, "") : null;
1176
+ return hit
1177
+ ? path
1178
+ .relative(cwd, hit)
1179
+ .replace(/\.(tsx?|jsx?)$/, "")
1180
+ .replace(/\\/g, "/")
1181
+ : null;
1174
1182
  };
1175
1183
 
1176
1184
  function walk(dir: string, segments: string[], layouts: string[]): void {