bublejs / bublejs/buble

Remove unicode regexp support and reduce50%+ bundle size.

Open
#275 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
874
Forks
62
PR merge metrics
No merged PRs in 30d

Description

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

[regenerate-unicode-properties](https://bundlephobia.com/package/regenerate-unicode-properties@10.0.1) package takes 47% of the bundle size. It's a dependency of [regexpu-core](https://bundlephobia.com/package/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](https://github.com/mathiasbynens/regexpu-core#caveats)**
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

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing the dependency chain through regexpu-core to regenerate-unicode-properties and the bundlephobia report for buble@0.20.0. Decide whether the scope is removing Unicode regexp support or producing a separate bundle without it; done means the chosen approach preserves the intended compatibility and reduces the bundle by roughly 50%.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
compilers, performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.