Skip to content

Commit 8995fdd

Browse files
committed
test windows
1 parent c54f479 commit 8995fdd

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

packages/fresh/src/dev/dev_build_cache.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const WINDOWS_SEPARATOR = pathWin32.SEPARATOR;
2020
/** Normalize a path to use forward slashes so that generated files
2121
* are portable across operating systems (e.g. build on Windows,
2222
* deploy on Linux). */
23-
function toPosix(p: string): string {
23+
export function toPosix(p: string): string {
2424
return p.replaceAll(WINDOWS_SEPARATOR, "/");
2525
}
2626

packages/plugin-vite/src/plugins/dev_server.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { ASSET_CACHE_BUST_KEY } from "fresh/internal";
55
import { createRequest, sendResponse } from "@remix-run/node-fetch-server";
66
import { hashCode } from "../shared.ts";
77
import type { ResolvedFreshViteConfig } from "../utils.ts";
8+
import { toPosix } from "../../../fresh/src/dev/dev_build_cache.ts";
89

910
function getContentType(ext: string): string {
1011
return getStdContentType(ext) ?? "application/octet-stream";
@@ -152,9 +153,13 @@ export function devServer(freshConfig: ResolvedFreshViteConfig): Plugin[] {
152153
if (mod.id?.includes("fresh-route-css::")) {
153154
let id = mod.id;
154155
if (id.startsWith("\0fresh-route-css::")) {
155-
id = `/@id/fresh-route-css::${
156-
id.slice("\0fresh-route-css::".length)
157-
}.module.css`;
156+
id = toPosix(
157+
`/@id/fresh-route-css::${
158+
id.slice("\0fresh-route-css::".length)
159+
}.module.css`,
160+
);
161+
// deno-lint-ignore no-console
162+
console.log("👺", id);
158163
}
159164
const routeCss = await collectCss(id, clientEnv);
160165
collected.push(...routeCss);

0 commit comments

Comments
 (0)