Skip to content

Latest commit

 

History

19 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple build of Monaco Editor

DEMO

Why?

Because Monaco Editor source has invalid ESM modules, large list of dependencies and complex bundler setup.

If you don't want to have more complex JS build process, add lot of extra lines to the bundler config or npm install plugins like webpack-monaco-loader-plugin or css-loader etc.

Build it outside of you project.

How?

npm run build

Will create dist files of Editor in /dist folder

Usage

Just import final bundle (from "/dist") as ES Module in your project..

<script type="module">
  import { editor } from "./monaco/index.js";

  editor.create(document.getElementById("container"), {
    value: ["function x() {", '\tconsole.log("Hello world!");', "}"].join("\n"),
    language: "javascript",
    minimap: {
      enabled: false,
    },
  });
</script>

About

Monaco Editor Component

Resources

Stars

5 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages