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

Add support for Node.js #1

Open
jordanbtucker opened this issue Jul 20, 2020 · 2 comments
Open

Add support for Node.js #1

jordanbtucker opened this issue Jul 20, 2020 · 2 comments

Comments

@jordanbtucker
Copy link

Please add support for Node.js. It currently only works in the browser.

@tim-elmer
Copy link

tim-elmer commented Dec 29, 2021

Not sure if this is still relevant - or if you're experiencing the exact same issue I am (using this in Antora), but I managed to get it to work by changing the module to use an export:

module.exports = function(hljs) {

@jordanbtucker
Copy link
Author

Yes, the problem is that src/vba.js is an ECMAScript module but the type field is not set to module in package.json.

See https://nodejs.org/dist/latest-v17.x/docs/api/esm.html#enabling

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

2 participants