Skip to content
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

[Bug] ESM Module invalid code #2839

Closed
2 tasks done
jogibear9988 opened this issue Dec 17, 2021 · 7 comments
Closed
2 tasks done

[Bug] ESM Module invalid code #2839

jogibear9988 opened this issue Dec 17, 2021 · 7 comments
Labels
feature-request Request for new features or functionality integration

Comments

@jogibear9988
Copy link

jogibear9988 commented Dec 17, 2021

Reproducible in vscode.dev or in VS Code Desktop?

  • Not reproducible in vscode.dev or VS Code Desktop

Reproducible in the monaco editor playground?

Monaco Editor Playground Code

No response

Actual Behavior

The ESM Module Code of Monaco Editor contains css imports wich are non valid Javascript Code.
When they will be supported they need the following addition: "assert { type: 'css' };"

see also: https://web.dev/css-module-scripts/

Expected Behavior

css imports contain the assert

Additional Context

No response

@jogibear9988
Copy link
Author

When this change is done, maybe the esm code could be used without a bundler

@hediet
Copy link
Member

hediet commented Dec 20, 2021

The ESM Module Code of Monaco Editor contains css imports wich are non valid Javascript Code.

Can you show some code that has such css imports?

@hediet hediet added feature-request Request for new features or functionality integration labels Dec 20, 2021
@jogibear9988
Copy link
Author

I've also created an issue at vscode: microsoft/vscode#139416

cause I don't know where it should be fixed.

if your bundler should fix this, our if it should be fixed in vscode. (or both)

@hediet
Copy link
Member

hediet commented Dec 20, 2021

Can you show some code that has such css imports?

I meant in the compiled js code. I'm aware of the css imports in the typescript source code, but I currently don't know how esbuild handles those.

@jogibear9988
Copy link
Author

sse: https://unpkg.com/monaco-editor@0.31.1/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js

it looks like this:

     import './accessibilityHelp.css';

@alexdima
Copy link
Member

Let's track in #886

@github-actions github-actions bot locked and limited conversation to collaborators Feb 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality integration
Projects
None yet
Development

No branches or pull requests

3 participants