Thank you. I loaded the css seperately and it worked. But now i have another issue.
The yaml lint depends on js-yaml.
I added this as a npm module and incuded it in main.js as
paths: {
‘js-yaml’: window.siteRootDir + ‘node_modules/js-yaml/lib/js-yaml’,
Then I included this in my js file as
define([
‘js-yaml’,
Still i see this error,
yaml-lint.js:22 Error: window.jsyaml not defined, CodeMirror YAML linting cannot run.
(My reply to your DM—please don’t ask the same question over multiple channels.)
The linter appears to expect the YAML parser under window.jsyaml, so you’ll have to somehow put it there if you’re loading it via a module loader.
CodeMirror is prettty terrible about external dependencies for now (because it grew up at a time where JS module management was a terrible mess). SorrThe linter appears to expect the YAML parser under window.jsyaml, so you’ll have to somehow put it there if you’re loading it via a module loader.
CodeMirror is prettty terrible about external dependencies for now (because it grew up at a time where JS module management was a terrible mess). Sorry about the inconvenience—this is going to be better in version 6. (Though for CSS files, there still doesn’t seem to be a good solution.)y about the inconvenience—this is going to be better in version 6. (Though for CSS files, there still doesn’t seem to be a good solution.)