Skip to main content

@roots/sage

Preset configuration for the Sage WordPress starter theme

Installation​

npm install @roots/sage --save-dev

Usage​

The Sage docs cover everything in more detail than can be found here.

Included extensions​

The @roots/sage extension depends on @roots/bud-preset-wordpress which in turn depends on @roots/bud-preset-recommend.

These are the packages which are installed as peers and registered by the @roots/sage main extension:

ExtensionDescription
@roots/bud-swcSWC
@roots/bud-postcssPostCSS
@roots/bud-reactReact support
@roots/bud-preset-wordpressWordPress preset

Acorn compatibility​

roots/sage is built with the roots/acorn framework. This preset guarantees compatibility with Acorn's API for enqueuing JS and CSS.

If you do not wish to use Acorn to enqueue assets you can disable the Acorn extension:

export default async (bud: Bud) => {
bud.sage.acorn.enable(false)
}

This will restore the default behavior of including the public path (e.g. /app/themes/sage/public) in entrypoints manifest values.