![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
monaco-editor-wrapper
Advanced tools
This packages provides a wrapped monaco-editor
with or without language support (main package export). The monaco-languageclient
can be activated to connect to a language server either via jsonrpc over a websocket to an external server process or via language server protocol for browser where the language server runs in a web worker.
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
This will clean, compile and build a bundle of the monaco-editor-wrapper
, which you can reference in your own projects. For examples, you can see the top-level README with details on running a local dev instance.
s With release 2.0.0, the configuration approach is completely revised.
The UserConfig
now contains everything and is passed to the start
function of the wrapper. Because monaco-vscode-api uses a VS Code extension like configuration approach, the UserConfig
allows to configure monaco-editor the classical way or to use monaco-vscode-api way. Additionally, monaco-vscode-api brings VS Code services to monaco-editor it usually does not have (Textmate Support, VS Code Theme Support, Keybindings, etc.). The wrapper initializes the following services from monaco-vscode-api independent of the editor mode: model, editor and configuration.
Monaco Editor with TypeScript language support in web worker and relying on regular monaco-editor configuration:
import { MonacoEditorLanguageClientWrapper, UserConfig } from 'monaco-editor-wrapper';
import 'monaco-editor/esm/vs/basic-languages/typescript/typescript.contribution.js';
import 'monaco-editor/esm/vs/language/typescript/monaco.contribution.js';
// helper function for loading monaco-editor's own workers
import { buildWorkerDefinition } from 'monaco-editor-workers';
buildWorkerDefinition('./node_modules/monaco-editor-workers/dist/workers', import.meta.url, false);
// no top-level await
const run = async () => {
const wrapper = new MonacoEditorLanguageClientWrapper();
const userConfig = {
htmlElement: document.getElementById('monaco-editor-root') as HTMLElement,
// rely on regular monaco-editor configuration
wrapperConfig: {
editorAppConfig: {
$type: 'classic',
languageId: 'typescript',
code: `function sayHello(): string {
return "Hello";
};`,
useDiffEditor: false,
}
}
};
await wrapper.start(userConfig);
}
These are the examples specifically for monaco-editor-wrapper
you find in the repository:
FAQs
Wrapper for monaco-vscode-editor-api and monaco-languageclient
The npm package monaco-editor-wrapper receives a total of 6,600 weekly downloads. As such, monaco-editor-wrapper popularity was classified as popular.
We found that monaco-editor-wrapper demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.