Open alex996 opened 3 years ago
+1
front-matter
and gray-matter
are using js-yaml@3.13.1
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.
When bundled for browsers, this modules adds over 170 KB in bundle size via
js-yaml
(38 KB) and its dependencyesprima
(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
andyaml-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.