highlightjs / vue-plugin

Highlight.js Vue Plugin
BSD 3-Clause "New" or "Revised" License
207 stars 27 forks source link

(doc): Fix usage of highlight.js/lib/common #20

Closed Trinovantes closed 3 years ago

Trinovantes commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

Good point, I'll update the PR