Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update readme. fix documentation for syntax highlighting #645

Closed
wants to merge 1 commit into from
Closed

update readme. fix documentation for syntax highlighting #645

wants to merge 1 commit into from

Conversation

kimbaudi
Copy link

@kimbaudi kimbaudi commented Sep 2, 2021

Initial checklist

  • I read the support docs
  • I read the contributing guide
  • I agree to follow the code of conduct
  • I searched issues and couldn’t find anything (or linked relevant results below)
  • If applicable, I’ve added docs and tests

Description of changes

import prismjs styles from path to cjs instead of esm.

many people using react-markdown are getting error because of this incorrect line of code. see react-syntax-highlighter/react-syntax-highlighter#230. updating the readme should clear up any confusion.

@github-actions github-actions bot added the 👋 phase/new Post is being triaged automatically label Sep 2, 2021
@github-actions

This comment has been minimized.

@github-actions github-actions bot added 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels Sep 2, 2021
@ChristianMurphy
Copy link
Member

Some additional context, for most ESM related issues with Next https://nextjs.org/blog/next-11-1#es-modules-support is an appropriate solution.
However it doesn't solve this https://codesandbox.io/s/next-syntax-highlight-ymmq3?file=/next.config.js
react-syntax-highlighter is psuedo-esm vercel/next.js#27876 (reply in thread) and https://github.com/react-syntax-highlighter/react-syntax-highlighter/blob/3ead4ba5963ac797093fb872375bf713c1372f9a/package.json#L5-L6

This should be addressed when react-syntax-highlighter upgrades to refractor 4 react-syntax-highlighter/react-syntax-highlighter#420 which is itself ESM https://github.com/wooorm/refractor/releases/tag/4.0.0, and will likely encourage react-syntax-highlighter to also package standard ESM https://nodejs.org/api/esm.html#esm_modules_ecmascript_modules

@ChristianMurphy ChristianMurphy added the 📚 area/docs This affects documentation label Sep 3, 2021
@codecov-commenter

This comment has been minimized.

@kimbaudi
Copy link
Author

kimbaudi commented Sep 3, 2021

When I first heard about Next.js supporting ESM from vercel/next.js#9607, I thought I would be able to convert next.config.js from cjs to esm, but unfortunately it has to remain cjs 😢. I hope this is supported in the near future.

@wooorm
Copy link
Member

wooorm commented Sep 3, 2021

This project itself and all examples use actual ESM, I don’t think this should be added.

@kimbaudi
Copy link
Author

kimbaudi commented Sep 3, 2021

ok thats fine. closing this

@kimbaudi kimbaudi closed this Sep 3, 2021
@kimbaudi kimbaudi deleted the update-readme branch September 3, 2021 15:55
@github-actions

This comment has been minimized.

@wooorm wooorm added the 🙅 no/wontfix This is not (enough of) an issue for this project label Sep 3, 2021
@github-actions

This comment has been minimized.

@wooorm wooorm added 👎 phase/no Post cannot or will not be acted on and removed 🤞 phase/open Post is being triaged manually labels Sep 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📚 area/docs This affects documentation 🙅 no/wontfix This is not (enough of) an issue for this project 👎 phase/no Post cannot or will not be acted on
Development

Successfully merging this pull request may close these issues.

4 participants