2 ms·
Off the top of my head, the import logic could be something like: if(__DEV__) { require("loadApiMocking"); } Agreed that there'd be work to do
by acemarke 7y ago
Off the top of my head, the import logic could be something like:
if(__DEV__) {
require("loadApiMocking");
}
Agreed that there'd be work to do to keep real code responses and mocked responses in sync, but there's probably ways to automate that if you want. In fact, I can hypothetically imagine some way to introspect OpenAPI schema files and configure Mirage accordingly.