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

Build warnings under Angular 17 #537

Open
russelg opened this issue Nov 16, 2023 · 5 comments
Open

Build warnings under Angular 17 #537

russelg opened this issue Nov 16, 2023 · 5 comments

Comments

@russelg
Copy link

russelg commented Nov 16, 2023

angular-froala-wysiwyg/froala v4.1.3.

I have been seeing this warning when building my angular projects that use Froala:

▲ [WARNING] This case clause will never be evaluated because it duplicates an earlier case clause [duplicate-case]

    angular:script/global:scripts.js:10:622815:
      10 │ ...tFileIcon("jpegIcon");case"image/jpeg":return k.icon.getFileIco...
         ╵                              ~~~~~~~~~~~~
  The earlier case clause is here:

    angular:script/global:scripts.js:10:622760:
      10 │ ...etFileIcon("gifIcon");case"image/jpeg":return k.icon.getFileIco...
         ╵                              ~~~~~~~~~~~~

The code in question it is complaining about comes from Froala (specifically the filesManager plugin):
image

Not sure if this report belongs in the angular repo, or the editor repo (https://github.com/froala/wysiwyg-editor).
However, this warning was not visible until we updated to angular 17 (and therefore esbuild as the builder).

@michael-koch787
Copy link

Any updates on this?

1 similar comment
@Romilkajaria
Copy link

Any updates on this?

@superole
Copy link

@russelg I am very curious; -how did you find the code it is complaining about?
I am not using froala, but get a similar warning:

▲ [WARNING] This case clause will never be evaluated because it duplicates an earlier case clause [duplicate-case]

angular:script/global:scripts.js:2:1076775:
  2 │ ...2:return H1(G,2662,2671,!0,W);case 22:return Jf(G,1,10999,nd,3,W...
    ╵                                  ~~~~

The earlier case clause is here:

angular:script/global:scripts.js:2:1076739:
  2 │ ...1:return H1(G,2790,2799,!0,W);case 22:return H1(G,2662,2671,!0,W...
    ╵                                  ~~~~

...and I don't even know where to start looking.

@myhrcounsel
Copy link

I have the same error while trying to update an angular application to 19 and the latest Froala. I've taken froala out of the application and still get this error.

And as Superrole commented, I can't find any reference to that partial line of code.

@superole
Copy link

superole commented Dec 3, 2024

I finally found the "source" of my warning. By randomly searching through script files included in angular.json's "scripts":[].
I feel that it was "sheer dumb luck" though as Professor McGonagall would have put it ;)

I found it in a non public (company internal) dependency built with web-components.

I am sorry for the flooding of this thread with something clearly unrelated to froala, but it was the only relevant hit on google for this issue. And hopefully it will ease the frustration of others finding themselves fumbling in the dark on a similar bug-hunt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants