Skip to content

Fix Katex styles import for Vite

Stanislav Lashmanov requested to merge slashmanov/fix-vite-katex-import into master

What does this MR do and why?

Fix Katex styles import for Vite production build. Vite doesn't know how to resolve ~katex because that requires Webpack-specific resolving logic. We should alias ~katex to katex manually to preserve backwards compatibility with Webpack.

How to reproduce

  1. Run NODE_OPTIONS="--max-old-space-size=10240" bundle exec vite build.
  2. The build should finish successfully.
Edited by Stanislav Lashmanov

Merge request reports