vite_ruby icon indicating copy to clipboard operation
vite_ruby copied to clipboard

Switch to `tinyglobby` to match `vite`

Open benmccann opened this issue 7 months ago • 2 comments

https://github.com/search?q=repo%3AElMassimo%2Fvite_ruby%20fast-glob&type=code

Vite uses tinyglobby, which has only 2 dependencies compared to 17 dependencies for fast-glob. Using the same library as Vite will allow the dependency to be deduped

benmccann avatar May 30 '25 20:05 benmccann

Hi Ben, thanks for the heads up!

Does tinyglobby provide the same API as fast-glob? Based on the readme, it looks like this should be a quick change.

ElMassimo avatar May 30 '25 21:05 ElMassimo

Yep. It's compatible with both globby and fast-glob. It uses the default value of expandDirectories that globby uses, so when switching from fast-glob it is recommended to set expandDirectories: false. The other thing to note is that it uses named imports so change import glob from 'fast-glob' to import { glob } from 'tinyglobby'. Those should be the only things that would need to be changed

benmccann avatar May 30 '25 22:05 benmccann