Answer the question
In order to leave comments, you need to log in
How to cut a module from a build?
Good afternoon. There is an invariant module, which essentially provides a wrapper for logging to the console (warn, error, log) on a true/false condition. The module hangs in node_modules and is used everywhere in the code of projects in the form of code snippets:
import invariant from "ui-invariant";
...
invariant(condition, "message", "warn");
Answer the question
In order to leave comments, you need to log in
You don't have to cut anything. In production mode, this lib only outputs errors, at least that's what their documentation says.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question