Loading
CORE CONCEPTS
Rasengan.js allows you to serve static files like images, fonts, and other assets from a special folder called public.
Any file placed inside the public folder is automatically available at the base URL (/). This means you don’t need to import assets manually or use special loaders—just reference them directly in your code.
If you have an image located at:
txt/public/avatars/1.png
You can access it in your browser at:
txt/avatars/1.png
And use it in your code like this:
jsximport { Image } from "@rasenganjs/image"; export function Avatar({ id, alt }) { return <Image src={`/avatars/${id}.png`} alt={alt} width={64} height={64} />; }
public folder to keep them easily accessible./your-file.png) instead of importing images directly.This feature makes it easy to serve assets without additional configuration! 🚀