Skip to content

Commit

Permalink
Reduce size of Katex bundle
Browse files Browse the repository at this point in the history
Only load woff2 fonts instead of including all fallback font types in the bundle
  • Loading branch information
mjbvz committed Mar 11, 2021
1 parent da3cbe7 commit 9b2ee7f
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 3 deletions.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions extensions/notebook-markdown-extensions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"@types/markdown-it": "^0.0.0",
"css-loader": "^5.0.2",
"markdown-it": "^12.0.4",
"null-loader": "^4.0.1",
"style-loader": "^2.0.0",
"url-loader": "^4.1.1"
},
Expand Down
6 changes: 5 additions & 1 deletion extensions/notebook-markdown-extensions/webpack.notebook.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,13 @@ module.exports = {
use: ['style-loader', 'css-loader'],
},
{
test: /\.(woff|woff2|eot|ttf|otf)$/i,
test: /\.(woff2)$/i,
use: ['url-loader?limit=100000']
},
{
test: /\.(woff|eot|ttf|otf)$/i,
use: ['null-loader']
},
],
},
resolve: {
Expand Down
8 changes: 8 additions & 0 deletions extensions/notebook-markdown-extensions/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,14 @@ nanoid@^3.1.20:
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.20.tgz#badc263c6b1dcf14b71efaa85f6ab4c1d6cfc788"
integrity sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw==

null-loader@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/null-loader/-/null-loader-4.0.1.tgz#8e63bd3a2dd3c64236a4679428632edd0a6dbc6a"
integrity sha512-pxqVbi4U6N26lq+LmgIbB5XATP0VdZKOG25DhHi8btMmJJefGArFyDg1yc4U3hWCJbMqSrw0qyrz1UQX+qYXqg==
dependencies:
loader-utils "^2.0.0"
schema-utils "^3.0.0"

postcss-modules-extract-imports@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz#cda1f047c0ae80c97dbe28c3e76a43b88025741d"
Expand Down

0 comments on commit 9b2ee7f

Please sign in to comment.