Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Very large size in browser bundle #79

Open
alex996 opened this issue Jul 2, 2021 · 1 comment
Open

Very large size in browser bundle #79

alex996 opened this issue Jul 2, 2021 · 1 comment

Comments

@alex996
Copy link

alex996 commented Jul 2, 2021

When bundled for browsers, this modules adds over 170 KB in bundle size via js-yaml (38 KB) and its dependency esprima (130 KB). You can verify the estimated size on bundlephobia.

I noticed that this isn't limited to front-matter. Other packages like gray-matter and yaml-front-matter are in the same 170+ KB ballpark size. However, it's worth mentioning this in the readme (looks like it's one of the todos in #37) because the added size makes this package unsuitable for browsers.

Using a different/custom parser may solve this issue.

@szilarddoro
Copy link

+1

front-matter and gray-matter are using [email protected] which listed esprima as a dependency, but the latest version of js-yaml is not listing it as a dependency anymore.

Probably front-matter to use the latest version of js-yaml would solve this browser bundle size issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants