Fix #3657 Static files with special characters in their names (spaces, `#`, unicode, etc.) fail to load due to path encoding issues. ## Root cause `prepareStaticFile()` uses `new URL(pathname, base)` to normalize paths, but `new URL` doesn't properly encode characters that are already percent-encoded in the filesystem path. For example, a file literally named `test %20encodeUri` becomes `test%20%20encodeUri` (the space and literal `%20` are indistinguishable), instead of the correct `test%20%2520encodeUri`. --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Fresh vite plugin
Vite plugin for Fresh.
Usage
- Run
deno install jsr:@fresh/plugin-vite npm:vite - Ensure that your
deno.jsonhas thefreshimport mapping:
{
"imports": {
"fresh": "jsr:@fresh/core"
}
}
- Update your
vite.config.tsfile:
import { defineConfig } from "vite";
+ import { fresh } from "@fresh/plugin-vite";
export default defineConfig({
plugins: [
+ fresh(),
],
});
- Update your deno tasks respectively:
- Dev:
vite - Build:
vite build
More information on the Fresh documentation .