Static file processing #19

Open
opened 2026-03-24 04:21:51 +00:00 by tonymottaz · 1 comment
Owner

Support configuration for post-processing static files and built templates.

Config should take a glob to match the pathname of the request that yielded the file and a callback function to process.

config.postProcess('**/*.css', async (file) => {
  // file has some info about the matched file
  const out = await lightningCSS(file.content);
  return out.content;
}
Support configuration for post-processing static files and built templates. Config should take a glob to match the pathname of the request that yielded the file and a callback function to process. ```js config.postProcess('**/*.css', async (file) => { // file has some info about the matched file const out = await lightningCSS(file.content); return out.content; } ```
Author
Owner

Maybe this is possible in the upstream phase of middleware?

Maybe this is possible in the upstream phase of middleware?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
tonymottaz/grackle#19
No description provided.