Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sage/compiling-assets.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
date_modified: 2025-12-11 11:00
date_modified: 2026-03-22 11:00
date_published: 2015-09-01 18:19
description: Sage uses Vite for fast asset compilation with HMR support. Includes custom plugin for hot module replacement in WordPress block editor during development.
title: Compiling Assets in Sage with Vite
Expand Down Expand Up @@ -34,7 +34,7 @@ The configuration will generate the following files:
- `editor.css` - Styles used by the editor when creating/editing posts.
- `editor.js` - JavaScript for the block editor, i.e. block styles and variants.

It will also copy any files in the `images` or `fonts` directories under `/resources/assets/` into the `public` directory with the other compiled files, but does not optimize or compress them.
It will also copy any files in the `images` or `fonts` directories under `/resources/` into the `public` directory with the other compiled files, but does not optimize or compress them. This is handled by the `assets` option on `laravel-vite-plugin` in `vite.config.js`.

### Assets in Blade template files

Expand Down
3 changes: 2 additions & 1 deletion sage/sass.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
date_modified: 2025-04-15 11:15
date_modified: 2026-03-22 11:15
date_published: 2023-06-06 17:30
description: Enable Sass in Sage by renaming `app.css` to `app.scss` for advanced CSS preprocessing with variables and mixins.
title: Using Sass with Sage WordPress Theme
Expand Down Expand Up @@ -53,6 +53,7 @@ Modify `vite.config.js` to remove the Tailwind plugin, reference the new file ex
+ 'resources/css/editor.scss',
'resources/js/editor.js',
],
+ assets: ['resources/images/**', 'resources/fonts/**'],

wordpressThemeJson({
- disableTailwindColors: false,
Expand Down
Loading