unplugin-utils 

A set of utility functions commonly used by unplugins.
Thanks to @rollup/pluginutils. This projects is heavily copied from it.
Why Fork?
- π Platform agnostic, supports running in the browser, Node.js...
- βοΈ Subset, smaller bundle size.
Install
npm i unplugin-utils
Usage
createFilter
export default function myPlugin(options = {}) {
const filter = createFilter(options.include, options.exclude)
return {
transform(code, id) {
if (!filter(id)) return
},
}
}
normalizePath
import { normalizePath } from 'unplugin-utils'
normalizePath(String.raw`foo\bar`)
normalizePath('foo/bar')
License
MIT License Β© 2025 δΈε²ζΊε Kevin Deng
MIT Copyright (c) 2019 RollupJS Plugin Contributors (https://github.com/rollup/plugins/graphs/contributors)