feat(core): support exclude option for transformers (#2960)

This PR adds general support for an `exclude` option to file
transformers. This allows plugin to skip processing excluded files. The
exclude array can be a `string`, a `RegExp` or a glob pattern.

Fixes https://github.com/denoland/fresh/issues/2937
This commit is contained in:
Marvin Hagemeister
2025-05-16 15:17:43 +02:00
committed by GitHub
parent 107c25b79a
commit e996b5e2fe
4 changed files with 79 additions and 4 deletions
+4
View File
@@ -1,3 +1,5 @@
import type { OnTransformOptions } from "@fresh/core/dev";
export interface AutoprefixerOptions {
/** environment for `Browserslist` */
env?: string;
@@ -41,4 +43,6 @@ export interface AutoprefixerOptions {
export interface TailwindPluginOptions {
autoprefixer?: AutoprefixerOptions;
/** Exclude paths or globs that should not be processed */
exclude?: OnTransformOptions["exclude"];
}