Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

angular build optimizer does not work with monaco editor #1603

Closed
wszgrcy opened this issue Sep 30, 2019 · 3 comments
Closed

angular build optimizer does not work with monaco editor #1603

wszgrcy opened this issue Sep 30, 2019 · 3 comments

Comments

@wszgrcy
Copy link

wszgrcy commented Sep 30, 2019

monaco-editor version: 0.18.1
**Browser:chrome
**OS:win10

Steps or JS usage snippet reproducing the issue:
The problem in this issues
It's not my issues but I have the same with it.
error-demourl
When I run with ng serve the monaco has no bug
But When I run with ng serve --prod(production mode),the monaco has bug on Console
bug

I think the bug belong to angular-cli or monaco ,but in angular-cli ,past few months, it's not fixed.So I hope monaco can see it and give a solution.

@alexdima
Copy link
Member

This looks like it is an issue specific to @angular-devkit/build-optimizer --- angular/angular-cli#14033 . We can leave this issue here open for a while, but there is no code change planned on our side to address this...

@petermikitsh
Copy link

Angular appears to have no plans to change this behavior in the build optimizer. You need to turn off the build optimizer, or have the optimizer ignore Monaco.

However, if the error stems from not following best practices (e.g, object property access should be side-effect free), it could be worthwhile to explore changing Monaco so it plays nicely with uglifyjs. It could benefit the maintainability of Monaco, since developers working on Monaco could unintentionally assume those best practices are valid here.

Both sides present valid arguments. Angular shouldn't impose assumptions on third-party library code, but also making changes to conform to those fairly reasonable assumptions could be overall beneficial to maintainers.

@alexdima
Copy link
Member

alexdima commented Oct 3, 2019

Ignoring the tree shaking optimization for the Monaco Editor sounds reasonable.

The Monaco Editor is shipped from "tree shaken" VS Code sources -- see here

@alexdima alexdima added this to the Backlog milestone Dec 11, 2019
@alexdima alexdima changed the title angular build with prod causes runtime errors angular build optimizer does not work with monaco editor Dec 11, 2019
@hediet hediet added the question label Dec 8, 2021
@microsoft microsoft locked and limited conversation to collaborators Mar 3, 2023
@hediet hediet converted this issue into discussion #3630 Mar 3, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

4 participants