medfreeman / markdown-it-toc-and-anchor

markdown-it plugin to add a toc and anchor links in headings
MIT License
60 stars 35 forks source link

300K added while including this lib in app #44

Open windmaomao opened 6 years ago

windmaomao commented 6 years ago

I wonder what caused this. vendor.js shoot from 213K to 503K by including this line

 md.use(require('markdown-it-toc-and-anchor'), {
   anchorLink: false
 })
medfreeman commented 5 years ago

It probably comes from this line, that imports Token from markdown-it, which probably causes importing markdown-it twice.

If you troubleshotted this in the meantime, i'll be happy to know what causes this, since i never had the occasion to use this module in a browser setting.