highlightjs / vue-plugin

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

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

Closed Trinovantes closed 2 years ago

Trinovantes commented 2 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 2 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 2 years ago

Good point, I'll update the PR