Import vue2-ace-ditor modes list

20 views Asked by At

I want to list the available modes (i.e languages) for vue2-ace-editor. My end goal is to let the user choose the syntax highlight mode they want in a drop-down list.

I think I can get the list I'm looking for from this file: brace/ext/modelist.

The file exports look like this:

module.exports = {
    getModeForPath: getModeForPath,
    modes: modes,
    modesByName: modesByName
};

And I'm trying to import it like so at the very begining of my component's code:

import brace from "brace";
import modesByName from "brace/ext/modelist";
console.log(JSON.stringify(modesByName));

However the modesByName object is always empty. What should I change?

0

There are 0 answers