You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 22, 2024. It is now read-only.
This project is discontinued. A successor is available has part of monaco-editor-wrapper.
This package supplies all monaco-editor workers as module or classic workers (bundled with vite/rollup) and it contains a utility function that applies them to MonacoEnvironment:
Workers are now exported in the packages.json. This could be handy for re-bundling.
import{buildWorkerDefinition}from"monaco-editor-workers";// supply path to workers path, the basePath and tell if module (true) or classic (false) workers shall be used.// Classic workers are still required by Firefox.buildWorkerDefinition('./node_modules/monaco-editor-workers/dist/workers',import.meta.url,false);
The version of this package is aligned with the version of monaco-editor.
Getting Started
We recommend using Volta to ensure your node & npm are on known good versions.
If you have node.js LTS available, then from the root of the project run:
npm i
npm run build
If you get an error with npm i regarding tree-mending, you can run npm ci to clean things up from previous installations and continue.
Afterwards, launch the Vite development server:
npm run dev
You can find one example (manual human testing) here index.html. They can be used once Vite is running. You can reach it once started on https://localhost:5173.
About
Bundles the editor and language workers of monaco-editor as module and classic worker.