nextra
nextra copied to clipboard
Syntax highlight behavior is different between versions
Hey 👋🏼
I'm having some issues to get syntax highlighting working properly. I've different behaviors with the stable, alpha and beta versions of Nextra.
For brevity purposes, I'm importing prismjs/components/prism-rego
in the pages/_app.jsx
and this is the .mdx
file that's causing issues:
Some code sample:
```rego
package repository
```
With 1.1.0
(current stable ATTOW):
🔽 Everything compiles correctly but I don't get syntax highlighting (click to expand):
With 2.0.0-alpha.50
(current alpha ATTOW):
🔽 Doesn't even compile (click to expand):
With 2.0.0-beta.5
(current beta ATTOW):
🔽 Compiles and works as expected (with next dev
), but next build
stops working* (click to expand):
next dev
), but next build
stops working* (click to expand):For reference, I'm on:
$ node -v
v16.14.2
$ npm -v
8.5.5
* The issue I have when upgrading to the beta
versions is (click to expand):
beta
versions is (click to expand):Please, let me know if you need any further details.
Thanks in advance!
The issue with the errors using npm run build
look to be related with something inside the pages/features/mdx.mdx
file. I'm still trying to figure out what exactly. FYI I've generated the site using the template in Vercel.
Deleting the file mentioned compiles everything without errors using the beta
version.
Closed since issue related to nextra 1