Skip to content
New issue

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

it works OK in dev env but failed in production env #48

Open
ShenJet opened this issue Jul 19, 2024 · 1 comment
Open

it works OK in dev env but failed in production env #48

ShenJet opened this issue Jul 19, 2024 · 1 comment

Comments

@ShenJet
Copy link

ShenJet commented Jul 19, 2024

it works OK in dev env but failed in production env.

env:
angular 14
@monaco-editor/loader ^1.4.0
monaco-editor ^0.50.0

main code:
import loader from '@monaco-editor/loader';

console.log(loader) // ok
console.log(loader.init) // ok

loader.init().then((monaco: any) => {
// it does not run from here in PRODUCTION ENV
// and there was no any error happened in console
console.log('loader.init.then...');
console.log(monaco);
this.monacomain = monaco
console.log(this.monacomain,'--this.monacomain');
// ...
})

@suren-atoyan
Copy link
Owner

suren-atoyan commented Aug 2, 2024

It may be a CDN issue or CSP issue - please check these. If fix CDN issue try to load it from a different source (please check this) or use it as an npm package

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants