23b06af940
A recent commit (probably 2c7386c) has changed the import graph of the DI types in core, and somehow results in the ngc compiler deciding to re-export core DI types from application factories which tangentially use inject(). This is not really surprising; ngc's import graph can be very unstable. However, this results in a re-export of InjectFlags surviving JS compilation. InjectFlags was a const enum, akin to an interface in TS, with no runtime repesentation. This causes a warning to be emitted by Webpack when it sees the re-export of InjectFlags. This commit avoids the issue by removing 'const' from the declaration of InjectFlags, causing it to have a runtime value. This is a temporary fix. The real fix will be for ngc to no longer write exports of const enums. Testing strategy: manually verified. Due to the problem only manifesting when recompiling after a change and then running Webpack, there is no existing framework via which this could be easily tested with an integration test. Additionally, the potential for this issue is gone in Ivy, so this solution is only temporarily needed. Fixes #27251. PR Close #27279