microsoft / microsoft/monaco-editor

ESM and CSS loading

Open
#886 57 comments 33 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

In the ESM (EcmaScript Modules) version, css files are being imported like:

import './actionbar.css';

I have looked into the ECMA-262, TC39 proposals etc. but nowhere I could find that importing CSS files or other assets is allowed this way. Do any browsers support importing CSS files that way? Do I miss anything obvious? To me the ESM version is not ESM ;).

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 with the ESM import example for actionbar.css and review the issue's browser and ECMAScript discussion. Determine whether this asset-import approach is supported by the relevant browsers and clarify the accepted handling; done means the ESM status and required behavior have a clear resolution.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, javascript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.