new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Vite · Guide · all subjects

assets/public-directory

4 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

Public directory defaults to <root>/public

The public directory defaults to `<root>/public`, but can be configured via the `publicDir` configuration option.

Public directory purpose and usage

The public directory is for assets that are never referenced in source code (e.g., `robots.txt`), must retain the exact same file name without hashing, or when you don't want to import an asset first just to get its URL. Assets in this directory will be served at root path `/` during dev, and copied to the root of the dist directory as-is.

Reference public assets with root absolute path

Public assets should always be referenced using root absolute path - for example, `public/icon.png` should be referenced in source code as `/icon.png`.

Prefer importing assets over public directory

In general, prefer importing assets unless you specifically need the guarantees provided by the public directory.

Give your agent this brain