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

Highlight.js Dependency Breaks Webpack Builds #65

Open
drewmoore opened this issue Oct 15, 2018 · 0 comments
Open

Highlight.js Dependency Breaks Webpack Builds #65

drewmoore opened this issue Oct 15, 2018 · 0 comments

Comments

@drewmoore
Copy link

Hello, we started getting build and deployment failures that I traced to this package. An example error is one such as below:

ERROR in 33-chunk-ad7e81b972059fad92fe.js from UglifyJs
Unexpected token: keyword (const) [./node_modules/highlight.js/lib/languages/reasonml.js:36,0][33-chunk-ad7e81b972059fad92fe.js:18860,2]

This is because the highlight.js package recently introduced code using const, which breaks UglifyJS: highlightjs/highlight.js@1c70469.

I fixed this for my team's purposes by forking this repo and setting highlight.js to version 9.11.0:
https://github.com/drewmoore/react-highlight/blob/9eb2b4cdab046fda8317e6ca03ab0483b9a955ff/package.json#L28

I would be happy to submit a PR if you would like. This issue has been reported on the highlight.js repo at highlightjs/highlight.js#1871

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant