Skip to content

Conversation

Trinovantes
Copy link
Contributor

Modern bundlers will optimize out unused imported names. Importing the module directly will indicate that it is a side effect and should not be optimized out.

Fix #18

@joshgoebel
Copy link
Member

joshgoebel commented Oct 7, 2021

Ok, but how do I get the hljs object if I wish to customize it? Or I guess you'd just import it and reference it and that magically fixes it since now it's not optimized out? LOL

Feels like we need to explain both cases?

@Trinovantes
Copy link
Contributor Author

Good point, I'll update the PR

Modern bundlers will optimize out unused imported names. Importing the module directly will indicate that it is a side effect and should not be optimized out.

Fix #18
@joshgoebel joshgoebel merged commit 02c4757 into highlightjs:main Oct 7, 2021
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

Successfully merging this pull request may close these issues.

Syntax highlight does not work properly

2 participants