-
Notifications
You must be signed in to change notification settings - Fork 36k
monaco editor playground #276126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
monaco editor playground #276126
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a Monaco Editor playground environment using Vite as the development server. It replaces the previous HTTP server-based setup with a modern Vite-based development workflow.
- Adds a new
build/monaco-editor-playgrounddirectory with Vite configuration - Updates VS Code tasks and launch configurations to use Vite instead of the previous HTTP server
- Includes TypeScript, HTML, and CSS files for a minimal Monaco Editor test environment
Reviewed Changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| build/npm/dirs.js | Adds the monaco-editor-playground directory to the build directories list |
| build/monaco-editor-playground/vite.config.ts | Configures Vite with esbuild settings, server port, and file system permissions |
| build/monaco-editor-playground/tsconfig.json | TypeScript configuration for the playground with Vite-specific settings |
| build/monaco-editor-playground/package.json | NPM package configuration with Vite as a dev dependency |
| build/monaco-editor-playground/package-lock.json | Dependency lock file for Vite and its dependencies |
| build/monaco-editor-playground/index.ts | Main TypeScript entry point that loads Monaco Editor |
| build/monaco-editor-playground/index.html | Minimal HTML page for the playground |
| build/monaco-editor-playground/style.css | Basic styling for the editor container |
| .vscode/tasks.json | Updates task to launch Vite server instead of HTTP server |
| .vscode/launch.json | Updates launch configuration to use the new Vite task |
Files not reviewed (1)
- build/monaco-editor-playground/package-lock.json: Language not supported
| fs: { | ||
| allow: [ | ||
| // To allow loading from sources, not needed when loading monaco-editor from npm package | ||
| /// @ts-ignore |
Copilot
AI
Nov 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The @ts-ignore directive suppresses TypeScript errors but should be replaced with @ts-expect-error which is safer as it will error if the suppression is no longer needed. Additionally, consider using proper type casting or fixing the underlying type issue instead of suppressing the error.
| /// @ts-ignore | |
| /// @ts-expect-error |
| "noEmit": true, | ||
| "strict": true, | ||
| "forceConsistentCasingInFileNames": true, | ||
| "experimentalDecorators": true, |
Copilot
AI
Nov 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a trailing comma after the last property in the compilerOptions object (line 7). While this is valid JSON5/JSONC, tsconfig.json should follow standard JSON formatting which does not allow trailing commas in objects.
| "experimentalDecorators": true, | |
| "experimentalDecorators": true |
| <html lang="en"> | ||
| <body> |
Copilot
AI
Nov 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The HTML document is missing the DOCTYPE declaration, <head> section, and charset meta tag. Add <!DOCTYPE html> at the top, and include a proper <head> section with <meta charset="UTF-8"> to ensure proper rendering and character encoding.
See below for a potential fix:
@ -1,4 +1,9 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Monaco Editor Playground</title>
</head>
No description provided.