Skip to content

Suggest: Change require API for just the core library #2334

@joshgoebel

Description

@joshgoebel

Suggestion:

// require the highlight.js library including all languages
const hljs = require('./highlight.js');

// require the highlight.js library without languages
- const hljs = require("highlight.js/lib/highlight.js");
+ const hljs = require("highlight.js/core.js"); 

We could slide this change in with v10. I hate the redundancy and think this is a bit nicer. Unless there is some JS convention here that says the other way is the normal way everyone expects libraries to be structured?

I think we could even preserve the old API and just deprecate it.

@egor-rogov Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions