ravenq/markdown-it-vue

reduce the boundle size

ravenq opened this issue · 2 comments

the same bug list

#18
#23
#10
#6

reduce

vue-cli-plugin-webpack-bundle-analyzer

图片

图片

1. remove the markdown-it-icons

the plugin bundle is large. use markdown-it-font-awsome instead.

2. reduce the hilight.js lang

the support lang:

  • HTML
  • Json
  • css
  • shell
  • bash
  • C
  • Java
  • Python
  • C++
  • C#
  • PHP
  • SQL
  • R
  • Swift
  • Go
  • MATLAB
  • Ruby
  • Perl
  • Objective-C
  • Rust
  • Dart
  • Delphi
  • D
  • Kotlin
  • Scala
  • SAS
  • Lisp
  • Lua
  • Ada
  • Fortran
  • PowerShell
  • VBScript
  • VBscript-html
  • Groovy
  • Julia
  • Julia-repl
  • LabVIEW
  • Haskell
  • ActionScript
  • Scheme
  • TypeScript
  • F#
  • Prolog
  • Erlang

PR for you lang.

3. use echarts.simple only

the result

图片

图片

markdown-it-vue-light

the light model will remove the mermaid chart supports.

图片

图片

commit for this issue: 40d493a

use the version >= 1.1.0

if the bundle size is too large also for >= 1.1.0

you may use the markdown-it-vue-light:

import MarkdownItVueLight from 'markdown-it-vue/dist/markdonw-it-vue-light.umd.min.js'

the meraid chart will not supports for the markdown-it-vue-light components.

import MarkdownItVueLight from 'markdown-it-vue/dist/markdonw-it-vue-light.umd.min.js'

please fix the path, is markdown, not markdonw