I've been struggling with how to make js-yaml to work with my Codemirror component but no luck so far:
// const jsyaml = require("js-yaml");
// import * as jsyaml from "js-yaml";
window.jsyaml=jsyaml;
none of the two ways mentioned above to import the package work and I get the error jsyaml.loadAll is not a function which shows it's not imported correctly, would appreciate any help.
I've been struggling with how to make js-yaml to work with my Codemirror component but no luck so far:
// const jsyaml = require("js-yaml"); // import * as jsyaml from "js-yaml"; window.jsyaml=jsyaml;
none of the two ways mentioned above to import the package work and I get the error
jsyaml.loadAll is not a function
which shows it's not imported correctly, would appreciate any help.