When loading the component on a SharePoint 2019 on premises, it is stuck on "loading..."
See original GitHub issueDescribe the bug When you try to load this component on a modern experience page in SharePoint 2019, the editor is stuck on “loading…” Same page works on SharePoint online.
Seems like this is the broken flow:
the “configureLoader” function configures require, then calls:
require(['vs/editor/editor.main'], function (monaco) {...}
That gets the loader.js and the editor.main.js from the CDN on the page.
While on SPO it will then continue to load the rest of the needed files, on 2019 it will stop there and return “undefined” to the require handler function.
To Reproduce
Steps to reproduce the behavior:
- Create an SPFx web part package that uses this component
- Add it to a modern page on SharePoint 2019
- The editor will remain stuck on “loading…”
For reproduction, I am more than happy to share login and code to a test-site.
Expected behavior Editor should load correctly.
Screenshots
Desktop (please complete the following information):
- OS: Windows 10, 11
- Browser Chrome, Edge
- Version latest versions
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (5 by maintainers)
Top GitHub Comments
@shaipetel most probably it’s related to the original package (not react wrapper). But let’s try something - could you please check this discussion.
well, upon further testing - not 100%.
See, if I restore define to what it was before - then all auto complete and code markups do not show up.
So I have to keep it until my control is unmounted entirely, which solves this problem but - during the entire time the editor is on the page (in my case, user opens/closes it as needed) the rest of the page cannot use require to import anything.
So, since I’m only using it in design time its not very critical atm, but would be awesome if it is fixed in the future in a way that won’t conflict with other versions.