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

Using pat-tooltip leads to huge chunk sizes #43

Closed
thet opened this issue Nov 17, 2022 · 1 comment
Closed

Using pat-tooltip leads to huge chunk sizes #43

thet opened this issue Nov 17, 2022 · 1 comment

Comments

@thet
Copy link
Member

thet commented Nov 17, 2022

Including pat-tooltip includes pat-markdown which includes pat-syntax-highlight.
That includes the whole highlight.js library for no good reason. We do not need pat-markdown nor pat-syntax-highlight in pat-tiptap. The libraries are imported dynamically and only when needed, so there is no runtime issue with that. But the compiled bundle size is quite big and if we want to include the compiled bundle via npm packages so that these packages can be used via CDNs right away, this is just a waste of space.

Find a way to register pat-markdown to pat-tooltip if pat-markdown and not the other way around.
This would solve the issue.

Also, check the situation if hightlight.js / Webpack supports dynamic imports. Currently it doesn't. See:
highlightjs/highlight.js#3634

Analyze bundle with webpack-bundle-analyzer.

@thet thet assigned thet and unassigned thet Nov 17, 2022
@thet
Copy link
Member Author

thet commented Dec 7, 2022

Fixed by: Patternslib/Patterns#1089

@thet thet closed this as completed Dec 7, 2022
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

1 participant