You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unsupported private class error doesn't throw on building library for production #17518
when i export a component in the library module but not in the public API
the build command throw errors only in normal mode, but in production mode it completes successfully
ng new test-library --create-application=false
cd test-library
ng generate library test-library
ng g c test-export --export
ng b
ng b --prod
🔥 Exception or Error
both commands should throw the following error
Unsupported private class TestExportComponent. This class is visible to consumers via TestLibraryModule -> TestExportComponent, but is not exported from the top-level library entrypoint.
changed the title [-]Unsupported private class doesn't throw on building library for production[/-][+]Unsupported private class error doesn't throw on building library for production[/+]on Apr 21, 2020
@robertIsaac, the problem here is that the above is only an error when using Ivy rendering engine, with View Engine which is used for production builds, this is valid.
That said, we should add the export to the public api when using the schematics so that we generate valid code for both rendering engines.
Reacted by robertIsaac, Samarasimhareddy Kommireddy, Daniel Kimmich and nhhockeyplayer
Activity
[-]Unsupported private class doesn't throw on building library for production[/-][+]Unsupported private class error doesn't throw on building library for production[/+]alan-agius4 commentedon Apr 21, 2020
@robertIsaac, the problem here is that the above is only an error when using Ivy rendering engine, with View Engine which is used for production builds, this is valid.
That said, we should add the export to the public api when using the schematics so that we generate valid code for both rendering engines.
SvenBudak commentedon Feb 4, 2022
Any news?`i sitll have this issue on a new generated project with angular version 13.1.0
alan-agius4 commentedon Jul 4, 2022
SvenBudak commentedon Jul 4, 2022
alan-agius4 commentedon Jul 4, 2022
Amit221060 commentedon Oct 6, 2023
Do we need to add all exports in public.api.ts or any other work around after angular 12.