bublejs / buble

https://buble.surge.sh
MIT License
869 stars 67 forks source link

Remove unicode regexp support and reduce50%+ bundle size. #275

Open ksenginew opened 2 years ago

ksenginew commented 2 years ago

I had recently inspected buble dependencies with bundlephobia.com https://bundlephobia.com/package/buble@0.20.0

regenerate-unicode-properties package takes 47% of the bundle size. It's a dependency of regexpu-core.

regexpu core enables rewriting regular expressions that make use of the ES6 u flag into equivalent ES5-compatible regular expression patterns.

So regepu-core uses 50%(47%+3%) of the bundle size for just unicode regular expressions with cavets That's not an essential feature. buble can remove support for unicode regular expressions or create a new bundle(named babel-lite or something) without unicode regexp support