{"id":25301,"library":"esbuild-monaco-editor-plugin","title":"esbuild-monaco-editor-plugin","description":"esbuild plugin for integrating Monaco Editor (v0.1.1). It configures esbuild to handle Monaco's web workers and language assets. The plugin is incomplete; imports from 'editor.api.js' require manual language imports, while 'editor.main.js' loads all languages. Alternative to webpack-based Monaco plugins. Low release cadence.","status":"active","version":"0.1.1","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","esbuild","monaco","editor"],"install":[{"cmd":"npm install esbuild-monaco-editor-plugin","lang":"bash","label":"npm"},{"cmd":"yarn add esbuild-monaco-editor-plugin","lang":"bash","label":"yarn"},{"cmd":"pnpm add esbuild-monaco-editor-plugin","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency for plugin usage","package":"esbuild","optional":false}],"imports":[{"note":"Package is CommonJS-only; ESM import may fail.","wrong":"import monacoEditorPlugin from 'esbuild-monaco-editor-plugin';","symbol":"default","correct":"const monacoEditorPlugin = require('esbuild-monaco-editor-plugin');"},{"note":"It's a default export, not named.","wrong":"import { monacoEditorPlugin } from 'esbuild-monaco-editor-plugin';","symbol":"monacoEditorPlugin","correct":"import monacoEditorPlugin from 'esbuild-monaco-editor-plugin'; // If using bundler with CJS interop"}],"quickstart":{"code":"const esbuild = require('esbuild');\nconst monacoEditorPlugin = require('esbuild-monaco-editor-plugin');\n\nesbuild.build({\n  entryPoints: ['src/app.js'],\n  bundle: true,\n  outdir: 'dist',\n  plugins: [monacoEditorPlugin],\n}).catch(() => process.exit(1));","lang":"javascript","description":"Shows how to use the plugin in an esbuild build script."},"warnings":[{"fix":"Import from 'editor.main.js' instead, or manually load language features.","message":"Plugin does not handle language workers automatically when importing from 'editor.api.js'","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Use correct flag '--watch'.","message":"Misspelled '--wtach' in example code","severity":"deprecated","affected_versions":">=0.1.1"},{"fix":"Check compatibility; consider alternatives like 'monaco-editor-esbuild'.","message":"Plugin may not work with newer esbuild versions due to internal changes.","severity":"gotcha","affected_versions":">=0.1.1"},{"fix":"Correct to 'esbuild.build()'.","message":"Typo in example: 'ebuild.build' instead of 'esbuild.build'.","severity":"gotcha","affected_versions":">=0.1.1"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Ensure monaco-editor is installed and import from 'monaco-editor/esm/vs/editor/editor.main.js'.","cause":"Plugin does not resolve Monaco editor source files correctly.","error":"Error: Cannot find module 'monaco-editor/esm/vs/editor/editor.api.js'"},{"fix":"Use default import: const monacoEditorPlugin = require('esbuild-monaco-editor-plugin');","cause":"Importing with named import instead of default.","error":"Error: The plugin 'esbuild-monaco-editor-plugin' is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}