I want to add monaco editor on my website but when i try this code :
<script src="https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.32.0-dev.20211222/min/vs/loader.js" integrity="sha512-9fANEu2oim+NnACLlgBgJAgG3FMQNOIifCcsxzqDAVbHSTtiFECb+pQf7G2BYwxwYkfPrNtULNCvy4DHyFzPoQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script>
require.config({ paths: { vs: 'https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.32.0-dev.20211222/min/vs/' } });
require(['vs/editor/editor.main'], function () {
let editor = monaco.editor.create(document.getElementById('container'), {
value: ['function x() {', '\tconsole.log("Hello world!");', '}'].join('\n'),
language: 'javascript',
theme: 'vs-dark'
});
});
</script>
I have an error in the developer console: Loading the script at the address" https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.32.0-dev.20211222/min/v/ vs / language / typescript / tsWorker.js "with importScripts () was blocked due to a forbidden MIME type (" text / html ") .
I checked the url in cdnjs.com and found this error: min / v / vs / there is no that but / min / vs
I think this is not an error provided by the contributor of monaco editor but I do not understand what my error is