We experienced console errors after upgrading monaco-editor from 0.20.0 to 0.21.0 in our application. We access monaco.languages.css.cssDefaults, which was failing because monaco.languages.css is undefined.
Possible cause:
It looks like esm/vs/language/css/monaco.contribution.js contains the line
languages.json = { cssDefaults: cssDefaults, lessDefaults: lessDefaults, scssDefaults: scssDefaults };
(note that it is setting languages.json and not languages.css)
monaco-editor version: 0.21.0+
Browser: Firefox/Electron
OS: macOS
Playground code that reproduces the issue:
console.log({ css: monaco.languages.css, html: monaco.languages.html });
console output:
> Object { css: undefined, html: {鈥 }
You might want to check with version 0.21.0 since that came out recently.
Sorry that was a typo, it should have said 0.21.0+. I've tried both 0.21.0 and 0.21.1.
This is also reproducible on https://microsoft.github.io/monaco-editor/playground.html.
published [email protected] with the fix.
Most helpful comment
published
[email protected]with the fix.