Open allan2 opened 3 years ago
I've tried Next.js and it looks like that it works. Steps to reproduce:
yarn create next-app
yarn add @matejmazur/react-katex katex
index.js
import 'katex/dist/katex.min.css';
import TeX from '@matejmazur/react-katex';
export default function Home() {
return (
...
<TeX>\int_0^\infty x^2 dx</TeX>
);
}
Could you please create or publish the repository with the given error so I can look at it.
Matej, thanks for taking the time.
My minimal working example is here ---> https://github.com/allan2/nextjs-katex It works.
My problem was the import of <TeX>
was filled in by WebStorm like this:
// what the IDE does when I right-click on <TeX>
import TeX from '@matejmazur/react-katex/src/index'
// what it should be
import TeX from '@matejmazur/react-katex'
Is this something that could be fixed so the IDE fills it in the correct way?
I use VS Code so I don't know why this happens in Webstorm. Maybe somebody else with Webstorm can help. :)
I'm trying to use
katex
and@matejmazur/react-katex
with Next.js.I'm getting this error: Failed to compile error:
I have this in my
next.config.js
file:I think I'm missing something. Would anybody have any suggestions?