Skip to content

v3.0.0

Compare
Choose a tag to compare
@gluons gluons released this 02 Jan 06:31
· 101 commits to master since this release
v3.0.0
be14c6b

Breaking Changes

  • Vue Highlight.js now will not import all languages from Highlight.js. (#12)
    You have to import languages that you want by yourself and pass it to plugin options.

    For vue language, you can import from vue-highlight.js/lib/languages/vue.

    It'll significantly reduce your app bundle size.

    import Vue from 'vue';
    import VueHighlightJS from 'vue-highlight.js';
    
    // Highlight.js languages
    import javascript from 'highlight.js/lib/languages/javascript';
    import vue from 'vue-highlight.js/lib/languages/vue'; // Vue language
    
    Vue.use(VueHighlightJS, {
    	// Register only languages that you want
    	languages: {
    		javascript,
    		vue
    	}
    });

Internal Changes

  • Convert code to TypeScript.
  • Use vue-up to bundle library instead of plain webpack.