Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Import monaco editor using require js

I have installed monaco-editor using

npm install monaco-editor

now I want to require in my js file

so I have tried to require using

var monaco = require('monaco-editor');

but it is giving me module not found error.

Is there wrong I am doing?

like image 965
Sam Avatar asked Oct 25 '25 00:10

Sam


1 Answers

They just released ESM distribution which is compatible with webpack etc. Check out the docs here.

Also there are many examples for using monaco with webpack, parcel an so on. See all.

like image 138
Mesut Avatar answered Oct 27 '25 13:10

Mesut