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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rollup-plugin-visualizer",
"version": "5.14.0",
"version": "5.15.0",
"main": "./dist/plugin/index.js",
"author": "Denis Bardadym <bardadymchik@gmail.com>",
"license": "MIT",
Expand Down
7 changes: 6 additions & 1 deletion plugin/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,11 @@ export interface PluginVisualizerOptions {
* default. Otherwise, an ID must match one or more of the picomatch patterns, and must not match any of the options.exclude patterns.
*/
exclude?: Filter | Filter[];

/**
* filterModel: 'glob' | 'regexp'
*/
filterModel?: 'glob' | 'regexp'
}

const defaultSizeGetter: SizeGetter = () => Promise.resolve(0);
Expand Down Expand Up @@ -152,7 +157,7 @@ export const visualizer = (
const template = opts.template ?? "treemap";
const projectRoot = opts.projectRoot ?? process.cwd();

const filter = createFilter(opts.include, opts.exclude);
const filter = createFilter(opts.include, opts.exclude, opts.filterModel || 'glob');

const gzipSize = !!opts.gzipSize && !opts.sourcemap;
const brotliSize = !!opts.brotliSize && !opts.sourcemap;
Expand Down
Loading