microsoft / microsoft/monaco-editor

Update/create package.json for monaco-languages to support ESM

Open
#1,879 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature-request integration
Dominant language
JavaScript
Stars
46.8k
Forks
4.1k
Avg merge
17h 58m
Merged PRs (30d)
1

Description

This is an issue about the monaco-languages package.

I am trying to use the ESM version of one of the files while using ES modules (i.e., node --es-module-specifier-resolution=node --experimental-modules). Specifically, I am trying to do:

import { conf as stockPythonConfiguration, language as stockPythonLanguage } from "monaco-languages/release/esm/python/python"

Unfortunately, this does not work because the package.json for monaco-languages does not specify "type": "module". I suspect setting this would break things for other people, so perhaps there needs to be a separate monaco-languages-esm module with "type": "module" in its package.json?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting the monaco-languages package.json and the release/esm/python/python import path described in the issue. Determine how ESM metadata could support that import without breaking existing users, including whether a separate package is needed. Done means the demonstrated ESM import resolves while existing package usage remains supported.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.