fresh
fresh copied to clipboard
[Fresh-v2] Building assets with subfolders fails on windows
When building Fresh v2 on Windows, using subfolders for assets seems to break when running the app in production after building. The reason seems to be inconsistent paths with \\:
"staticFiles": {
"/images\\logo.svg": {
"hash": "1e0b7aa79648883158742ec4f064980898c4c8feff0c3300b8c7ea4485ef1354",
"generated": false
},
Trying to fetch /images/logo.svg just gives a HTTP 404 error.
Reproduction
- Initialize a Fresh project
deno run -Ar jsr:@fresh/[email protected] - Move the
assets/logo.svgtoassets/images/svg.logo - Update
routes/index.tsxwith updated image path - Build Fresh with
deno task build - Start prod server with
deno task start - Link to image is broken