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

KaTeXのスクリプトチャンクがやけにでかい #7395

Closed
tamaina opened this issue Mar 23, 2021 · 1 comment · Fixed by #7396
Closed

KaTeXのスクリプトチャンクがやけにでかい #7395

tamaina opened this issue Mar 23, 2021 · 1 comment · Fixed by #7396
Labels
✨Feature This adds/improves/enhances a feature

Comments

@tamaina
Copy link
Member

tamaina commented Mar 23, 2021

Summary

Misskeyをビルドすると、Webpackバンドルにひときわサイズが大きいチャンクがあります。

image

これはKaTeXの実行部分のようです。

中身を見ると、フォントファイル(あろうことか、Base64エンコなttf&woff&woff2の3種類)が含まれている模様。モダンブラウザならwoff2だけあればよいので、webpackの設定とかでフォントファイルを切り出すようにするべきかと思いました。

@tamaina tamaina added the ✨Feature This adds/improves/enhances a feature label Mar 23, 2021
@tamaina
Copy link
Member Author

tamaina commented Mar 23, 2021

https://github.com/syuilo/misskey/blob/d6e23b803b10a471bb5b1054b357c70a16e8f6da/webpack.config.ts#L108

url-loaderで明示してるのか
なにか理由が…?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨Feature This adds/improves/enhances a feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant