Stone.jsDocs
Paradigm

Frontend

Assets

Three kinds of asset, three clear homes: one entry stylesheet that is linked for you, component-local assets imported through short aliases, and a public directory copied to the build root untouched.

#The entry stylesheet

The main stylesheet is auto-linked into the document, so a single import point styles the whole app. Its path is a config key; the default is /assets/css/index.css.

stone.config.mjsjs
export default defineConfig({
  builder: { input: { mainCSS: '/assets/css/index.css' } }   // auto-linked
})

#Component assets via aliases

Import images and other assets in components through stable aliases instead of brittle relative paths. Each alias maps to a subfolder of the assets directory, resolved for both the client and the SSR build.

app/pages/Logo.tsxtsx
import mark from '@img/logo.svg'      // resolves to assets/img/logo.svg

export function Logo () {
  return <img src={mark} alt='Tasks' width={32} height={32} />
}

#The public directory

Files that must ship verbatim at the site root, robots.txt, llms.txt, a CNAME, favicons, go in public/. It is copied as-is to the build output; nothing processes it.

LocationTypeDescription
assets/css/index.cssentry CSSAuto-linked application stylesheet.
@img, @fonts, ...import aliasesComponent asset imports, mapped to assets/ subfolders.
public/verbatimCopied to the build root untouched (robots.txt, llms.txt, favicons).

Stone.js

Your app exists in every runtime. Until you run it.

An open-source project by Stone Foundation
Created by Mr. Stone (Evens Pierre)