-
Notifications
You must be signed in to change notification settings - Fork 207
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
How can I make a minimal es6 build? #1129
Comments
Because you are using the SVG output, this includes the path data for the MathJax TeX fonts, and that is a lot of data. Your size of 1.8MB is about right for that. As an aside, I see that you have included You might also consider loading |
Can you give or point to some guidance on how to load import { TeX } from "mathjax-full/es5/input/tex-base.js";
import { TeX } from "mathjax-full/components/src/input/tex-base/tex-base.js";
import { TeX } from "mathjax-full/components/src/input/tex-base/lib/tex-base.js"; with no luck. Also does that mean that both the packages included and the packages loaded don't have a meaningful effect on the output bundle size? Or just that the SVG path data has much more? |
Sorry, my mistake; I've been writing the documentation for using Components, so had that on my mind, but you are using direct module calls. You are correct to use
The SVG paths is a disable chunk of the result. From the size of the The TeX packages are small in comparison, so they don't make that much difference. The core infrastructure for MathJax is pretty extensive, and there isn't much that can be left out. |
I'm trying to create an es6 module with relatively minimal capabilities beyond using tex2svg. I tried creating a bundle from this file:
but the resulting build is really large (1.8MB). How can I create a "tree-shaked" build?
The text was updated successfully, but these errors were encountered: