atularen / ngx-monaco-editor

Monaco Editor component for Angular 2 and Above
https://www.npmjs.com/package/ngx-monaco-editor
MIT License
428 stars 155 forks source link

ngx-monaco-editor not working with angular 6 #56

Closed iampratapak closed 6 years ago

iampratapak commented 6 years ago

ngx-monaco-editor not working with angular 6 and angular cli-6 getting below error

Refused to execute script from 'http://localhost:8425/dashboard/assets/monaco/vs/loader.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.

I am using "ngx-monaco-editor": "^6.0.0". With angular 5 and mgx-monaco-editor 4 I am not facing any issues.

atu1kr commented 6 years ago

This is the sample code with angular 6 and ngx-monaco-editor 6.0.0. Please try if it works download

iampratapak commented 6 years ago

@atul-wizni thanks for the quick reply. It was my mistake with base href configuration to app. It's working after upgrading to monaco 6.

adilson8 commented 1 year ago

for those of who have some trouble because of it, try this down below.

{ "glob": "*/", "input": "../node_modules/ngx-monaco-editor/assets/monaco", "output": "./assets/monaco/" } -> { "glob": "*/", "input": "./node_modules/ngx-monaco-editor/assets/monaco", "output": "./assets/monaco/" }

i don't know why but it works for me.

nikita-fuchs commented 12 months ago

How can this be so convoluted? nothing of this works for me in angular 12 anymore.