Guides  ›  State helpers  ›  Style ← PREV NEXT →

Style

Return stylesheet tags from a list of asset paths.

function layout(state) {
  return state.style(['/bundle.css']) + '<h1>Hello!</h1>'
}

With this bundle configuration:

bundle: { css: ['/css/base.css', '/css/theme.css'] }

Development mode expands /bundle.css into the individual files. Production uses /bundle.css. Asset URLs include the configured revision.

Next: Script →

Tools for business systems.