DenoDDeno
Powered by
N!NZBRETTN
Denoβ€’4y ago
N!NZBRETT

Need help making fresh, rutt and preact base path aware

I'm currently trying to make fresh base path aware. I already patched rutt to work with base paths. It currently works pretty okay. Now I need help with preact as I have no experience with preact. Is there a way to tell preact to add a base path to e.g. all relative links?
E.g.:
<img src="/logo.svg" ...
<img src="/logo.svg" ...
from the jsx file should be 'compiled' to
<img src="/my_base_path/logo.svg" ...
<img src="/my_base_path/logo.svg" ...
. Or do we need to do this ourselves by adding a ${BASE_PATH} before all links?

A mono-repo for this mess: https://github.com/wille-io/deno-fresh-rutt-baseurl
GitHub
GitHub - wille-io/deno-fresh-rutt-baseurl
Contribute to wille-io/deno-fresh-rutt-baseurl development by creating an account on GitHub.
GitHub - wille-io/deno-fresh-rutt-baseurl
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,944Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Workspace-aware path imports
i_use_arch_btwIi_use_arch_btw / help
12mo ago
Hate Preact/react for Fresh Framework
DirkDDirk / help
2y ago
how to ssr preact (without fresh)
Anthony2beAAnthony2be / help
4y ago