Static assets#

The static pipeline discovers co-located CSS, JS, and module files, deduplicates them within a request, and injects them into HTML.

Concepts

Static assets overview

The mental model behind the pipeline.

Co-located files

How asset files are paired with pages and components.

Authoring

Static template tags

Template tags that emit the collected output.

JavaScript context

Exposing context to the browser through the Next object.

Mechanics

Deduplication

How the framework avoids emitting the same asset twice.

Asset kinds

Built-in kinds and how to register new ones.

Custom stems

Recognise additional filenames as component assets.

Extending

Static backends

Customizing the collector and the injection format through backends.

Static signals

Every signal the static subsystem emits.