materiahq / ngx-monaco-editor

Monaco Editor Library for Angular v6 and above
MIT License
159 stars 35 forks source link

`css-element-queries` CommonJS or AMD dependency warning in fesm2015 #36

Closed dominikfoldi closed 3 years ago

dominikfoldi commented 4 years ago

Angular version: 10.1.0 ngx-monaco-editor version: 4.0.2

When I build my project in prod mode Angular displays the following warning:

WARNING in ...\node_modules\@materia-ui\ngx-monaco-editor\fesm2015\materia-ui-ngx-monaco-editor.js depends on 'css-element-queries'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

I can workaround it by adding the following to my angular.json:

{
  ...
  "projects": {
    "my-project": {
      ...
      "architect": {
        "build": {
          ...
          "options": {
            ...
            "allowedCommonJsDependencies": [
              "css-element-queries"
             ]
           }
        }
     }
   }
 }
}

But "css-element-queries" is totally unrelated to my app, so it would be great if I wouldn't need to add it to my angular.json.

jmarc-roy commented 3 years ago

css-element-queries has been removed in v5.0.0.