File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import { ASSET_CACHE_BUST_KEY } from "fresh/internal";
55import { createRequest , sendResponse } from "@remix-run/node-fetch-server" ;
66import { hashCode } from "../shared.ts" ;
77import type { ResolvedFreshViteConfig } from "../utils.ts" ;
8+ import { toPosix } from "../../../fresh/src/dev/dev_build_cache.ts" ;
89
910function 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 ) ;
You can’t perform that action at this time.
0 commit comments