We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have tried to import monaco-editor as a shared component.
When I try to load the monaco using the below code , require is not loaded as a global function and gives the error saying config of undefined error
const onGotAmdLoader = (e?) => { // Load monaco (window).require.config({ paths: { 'vs': `assets/monaco-editor/min/vs` } }); (window).require(['vs/editor/editor.main'], () => { setTimeout(() => { (window).monaco = monaco; this.monacoLoaded = true; this.monacoLoadedSubject.next(true); }); }); }; // Load AMD loader if necessary if (!(window).require) { const loaderScript = document.createElement('script'); loaderScript.type = 'text/javascript'; loaderScript.src = '/assets/monaco-editor/min/vs/loader.js'; loaderScript.addEventListener('load', onGotAmdLoader); document.body.appendChild(loaderScript); } else { onGotAmdLoader(); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I have tried to import monaco-editor as a shared component.
When I try to load the monaco using the below code , require is not loaded as a global function and gives the error saying config of undefined error
The text was updated successfully, but these errors were encountered: