menu

Questions & Answers

Enable Strict Mode in Individual Module and not in the entire Angular Project

How we can enable the Strict Mode in Individual Module and not in the entire Angular Project.

We have a big project and we want to enable the strict mode but it is giving many error and we are trying to achieve this module wise.

Is there any way to enable Strict Mode in the Module level.

Trying to enable it in the module level but couldn't find any setting to do so.

Answers(1) :

We had the same issue some time ago and we did not find any solution to build the whole application with different library configurations.

The only solution we found was to build all strict libraries separately just to ensure they are written in strict mode:

Running the command ng build [library] will fail if the library violates the strict configuration.

The application which is configured without the strict flag is not affected by any configuration of used libraries.