@rolldown/pluginutils 1.0.0-rc.6 → 1.0.0-rc.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -39,7 +39,8 @@ const myPlugin = {
|
|
|
39
39
|
|
|
40
40
|
### Composable Filters
|
|
41
41
|
|
|
42
|
-
> [!WARNING]
|
|
42
|
+
> [!WARNING]
|
|
43
|
+
> Composable filters are not yet supported in Vite or unplugin. They can be used in Rolldown plugins only.
|
|
43
44
|
|
|
44
45
|
```ts
|
|
45
46
|
import { and, id, include, moduleType, query } from '@rolldown/pluginutils';
|
|
@@ -69,9 +70,14 @@ const myPlugin = {
|
|
|
69
70
|
### Composable Filters
|
|
70
71
|
|
|
71
72
|
- `and(...exprs)` / `or(...exprs)` / `not(expr)` — Logical composition of filter expressions.
|
|
72
|
-
- `id(pattern, params?)` — Filter by id
|
|
73
|
+
- `id(pattern, params?)` — Filter by id. A `string` pattern is matched by exact equality (not glob); a `RegExp` is tested against the id.
|
|
74
|
+
- `importerId(pattern, params?)` — Filter by importer id. A `string` pattern is matched by exact equality; a `RegExp` is tested against the importer id. Only usable with the `resolveId` hook.
|
|
73
75
|
- `moduleType(type)` — Filter by module type (e.g. 'js', 'tsx', or 'json').
|
|
74
76
|
- `code(pattern)` — Filter by code content.
|
|
75
77
|
- `query(key, pattern)` — Filter by query parameter.
|
|
76
78
|
- `include(expr)` / `exclude(expr)` — Top-level include/exclude wrappers.
|
|
77
79
|
- `queries(obj)` — Compose multiple query filters.
|
|
80
|
+
|
|
81
|
+
### Utilities
|
|
82
|
+
|
|
83
|
+
- `filterVitePlugins(plugins)` — Filters out Vite plugins with `apply: 'serve'`.
|