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

Using HLJS as a package dependency #3597

Closed
niktek opened this issue Aug 14, 2022 · 2 comments
Closed

Using HLJS as a package dependency #3597

niktek opened this issue Aug 14, 2022 · 2 comments
Labels
bug help welcome Could use help from community parser

Comments

@niktek
Copy link

niktek commented Aug 14, 2022

Describe the issue/behavior that seems buggy

We have a UI component library written in Svelte and one of the components utilises HLJS and it all works very nicely. However, when we pack our library and include HLJS in package.json:
"dependencies": { "highlight.js": "^11.6.0" }

Our end users get:
Indirectly exported binding name 'default' cannot be resolved by star export entries.

I see this is referenced in the discussion #3527 but I can't tell from that discussion what I need to do to resolve it.

I'm just wondering if there is any docs/other project links/any information on how we can properly include HLJS in our exported package so that it works for our end users ?

Cheers,
Nik

@joshgoebel
Copy link
Member

joshgoebel commented Aug 15, 2022

The ESM builds included in the main npm package are intended for use with the Node.js runtime, NOT to be compiled with build tools for bundling for the web... you may want to check out our CDN ESM builds instead: https://www.npmjs.com/package/@highlightjs/cdn-assets which are "pure" ESM.

I have no idea if that's your problem or not, just a thought.

@joshgoebel
Copy link
Member

Closing for inactivity, please response if you need further help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug help welcome Could use help from community parser
Projects
None yet
Development

No branches or pull requests

2 participants