Comments (5)
This is not an issue with remark-math
, rehype-katex
, ormdx
. I'm not sure it's an issue with next either.
Running MDX 2 and Next 12, with the official @mdx-js/loader
, it's able to run remark-math
and rehype-katex
fine.
https://codesandbox.io/s/next-mdx-math-katex-vd1qx?file=/next.config.mjs
next.config.mjs
// ⚠️ Important! Please make sure the dependencies are up to date.
import remarkMath from "remark-math";
import rehypeKatex from "rehype-katex";
const configuration = {
// Support MDX files as pages:
pageExtensions: ["md", "mdx", "tsx", "ts", "jsx", "js"],
// Support loading `.md`, `.mdx`:
webpack(config, options) {
config.module.rules.push({
test: /\.mdx?$/,
use: [
// The default `babel-loader` used by Next:
options.defaultLoaders.babel,
{
loader: "@mdx-js/loader",
/** @type {import('@mdx-js/loader').Options} */
options: {
/* jsxImportSource: …, otherOptions… */
remarkPlugins: [remarkMath],
rehypePlugins: [rehypeKatex]
},
},
],
});
return config;
},
};
export default configuration;
This is likely related to using mdx 1 (https://github.com/msukmanowsky/rehype-katex-issue/blob/8967ab668bbb59aae1354991728589eb271222cb/package.json#L11) with remark and rehype plugins which are compatible with mdx 2 (https://codesandbox.io/s/next-mdx-math-katex-vd1qx?file=/package.json)
As for the log you provide, it may be a next issue, there are a number of open issues related to caching strategy https://github.com/vercel/next.js/issues?q=is%3Aissue+is%3Aopen+webpack.cache.PackFileCacheStrategy
It should not however cause the issue you are seeing.
from remark-math.
Hi! This was closed. Team: If this was fixed, please add phase/solved
. Otherwise, please add one of the no/*
labels.
from remark-math.
Hi! Thanks for reaching out! Because we treat issues as our backlog, we close issues that are questions since they don’t represent a task to be completed.
See our support docs for how and where to ask questions.
Thanks,
— bb
from remark-math.
Hi, for the record rehype-mathjax
doesn't have an error message but seems to fail silently as well. Will try mdx v2.
from remark-math.
@eric-burel if @next/mdx
is silently swallowing errors it would be something to raise with the maintainers https://github.com/vercel/next.js/issues
from remark-math.
Related Issues (20)
- The dollar sign is not showing in single $ quote HOT 6
- rehype-mathjax should not have a dependency on @types/web HOT 13
- Generate (`pre` and) `code` elements instead of `div`, `span` HOT 1
- Hard break identifier immediately preceding $$ is not registered as a hard break. HOT 6
- Next.js hydration issue HOT 9
- Add mhchem support to rehype-katex HOT 14
- `rehype-katex` does not catch non-parse errors HOT 7
- Math and Katex renders incorrectly HOT 2
- remark-katex @mdx-js/rollup integration HOT 7
- rehype-mathjax: CHTML not rendering HOT 10
- Update KaTeX types HOT 5
- Mathjax Docs are Incorrect Due to Removal of index.js HOT 3
- MathJax error -- TypeError: Cannot read properties of null (reading '4') HOT 11
- Cannot read properties of undefined (reading 'mathFlowInside') HOT 14
- [Nuxt MDC] reading 'mathFlowInside' undefined when parsing a multi-line formula HOT 4
- Older version of `jsdom` (<23) causes deprecation warnings HOT 5
- Add a rehype plugin to use mathlive renderer HOT 3
- rehype-katex breaks in production build HOT 6
- mhchem doesn't seem to work with rehype-katex HOT 5
- KaTeX Macros With Global Scope HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from remark-math.