uiwjs / react-monacoeditor

Monaco Editor component for React.
https://uiwjs.github.io/react-monacoeditor/
MIT License
296 stars 25 forks source link

Importing with browserify? #63

Closed pierznj closed 3 years ago

pierznj commented 3 years ago

Looks like a great project, and exactly what I'm looking for. Unfortunately, when I try to import the component, my gulp/browserify build process fails with:

Error: Cannot find module 'monaco-editor' from '/<project path>/node_modules/@uiw/react-monacoeditor/lib/cjs'

I note that for webpack, a webpack plug in is required. Can it work with browserify?

jaywcjlove commented 3 years ago

@pierznj Not sure if it can be used in browserify.

Dependencies on monaco-editor.

do I need to install it?

pierznj commented 3 years ago

I believe you're right. There's probably some dirty way to do it, but I'm going to try Ace instead. Thanks for replying.