wooorm / lowlight

Virtual syntax highlighting for virtual DOMs and non-HTML things
MIT License
725 stars 25 forks source link

Use with webpack will throw Uncaught Error: Unknown language: `js` is not registered #39

Closed zzuu666 closed 3 years ago

zzuu666 commented 3 years ago

sideEffects filed in lowlight/package.json is false, and webpack will tree shake ./lib/common.js, so those register events will not execute.

IMO, lib/common.js and lib/all.js are have side effects, so sideEffects should not be false.

this is an example, https://github.com/zzuu666/webpack-side-effects

Thanks.

wooorm commented 3 years ago

solved! (most likely, can you check?)

zzuu666 commented 3 years ago

solved! (most likely, can you check?)

yes, it works after I upgrade to 2.2.1.