Assets
config/assets.php
The assets configuration file contains all settings related to the theme assets.
The default config enqueues the site.js file on every page.
This file is located in the assets/src/js directory.
For more advanced topics checkout Advanced/Vite.
Adding a new entry
Section titled “Adding a new entry”Entrypoints are defined in config/entrypoints.json — this is the single source of truth shared with vite.config.ts. Adding an entry here is all that’s needed for Vite to pick it up.
{ "lumbermill": "assets/src/js/site.js", "my-custom-js": "assets/src/js/my-custom.js"}To add WordPress-specific options for an entry (such as dependencies or admin-only loading), add it to the entrypoints array in config/assets.php. Entries without any options do not need an entry here.
<?php
return [ 'vite' => [ 'entrypoints' => [ 'my-custom-js' => [ 'dependencies' => ['jquery'], ], ], ],]Helpers
Section titled “Helpers”Some libraries need extra scripts to work properly, for example React.
To make it easier to add these scripts, you can use the helpers array.
<?php
return [ 'vite' => [ 'entrypoints' => [], 'helpers' => [ 'react' ], ],]Available helpers
Section titled “Available helpers”- react
Entrypoint options
Section titled “Entrypoint options”All options that can be used in the entrypoints array in config/assets.php.
| Option | Type | Description | Default |
|---|---|---|---|
| dependencies | array | The dependencies of the entry. | [] |
| is_admin | boolean | Enqueue only in the WordPress admin area. | false |
Admin entrypoints
Section titled “Admin entrypoints”To enqueue an entry only in the WordPress admin area, set is_admin to true.
<?php
return [ 'vite' => [ 'entrypoints' => [ 'my-admin-js' => [ 'is_admin' => true, ], ], ],]assets
Section titled “assets”These settings allow you to add extra assets to the theme, without using Vite.
Note: These assets will not be processed by Vite, so minification/optimisations will not be applied.
Check out the example below to see how to add assets.
<?php
return [ 'assets' => [ 'css' => [ 'my-custom-style' => [ 'path' => 'assets/src/scss/vendor/my-custom-style.css', ], ], 'js' => [ 'my-custom-script' => [ 'path' => 'assets/src/js/vendor/my-custom-script.js', ], ], ],];All options
Section titled “All options”All options that can be used in the css and js arrays.
| CSS | JS | Option | Type | Description | Required | Default |
|---|---|---|---|---|---|---|
| x | x | path | string | The relative file location based on the theme root. | Y | null |
| x | x | dependencies | array | The dependencies of the asset. | N | [] |
| x | x | version | string | The version of the asset. | N | null |
| - | x | in_footer | boolean | Whether or not to enqueue the asset in the footer. | N | false |
| - | x | is_admin | boolean | Enqueue only in the WordPress admin area. | N | false |
| x | - | media | string | The media type of the asset. | N | all |
update_scripts
Section titled “update_scripts”Is basically the same as the assets array, but is used for updating WordPress scripts.
optimisations
Section titled “optimisations”These settings allow you to enable/disable certain optimisations.
The boilerplate comes with the following optimisations enabled:
- Remove emoji styles

